0

I want to redirect all subdomains to the user profile , eg:

redirect this URL : http://alexusername.example.com

To : http://alexusername.example.com

But showing the content of : http://example.com/user.php?q=alexusername

I mean that I want to show the content of the http://example.com/user.php?q=alexusername without changing the URL in the browser I want it to still http://alexusername.example.com

I have tried this :

<IfModule mod_rewrite.c>
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteCond %{HTTP_HOST} !www.blackhawk.site$ [NC]
RewriteCond %{HTTP_HOST} ^(www.)?([a-z0-9-]+).blackhawk.site [NC]
RewriteRule ^(.*)$ http://blackhawk.site/user.php?q=%2 [L]
</IfModule>
iwaseatenbyagrue
  • 3,688
  • 15
  • 24

0 Answers0