Is it possible to use .htaccess to rewrite a sub domain?
Example:
http://fashion.example.com
shows the content of
http://example.com/index.php?name=fashion
<IfModule mod_rewrite.c>
# Turn on the rewrite engine
RewriteEngine on
RewriteRule %{REQUEST_URI} ^(.*).example.com/$ index.php?name=$1
</IfModule>
2
Answers
Assuming your subdomain is pointing to the same directory as your main domain, you can use something like the following :
You may try this rule: