I have something like this.
http://www.mydomain.com/page.php?s=database&name=page
How do i mod rewrite it in such a way that it become.
http://www.database.mydomain.com/page/
I successfully map it into a subdomain format as below using (database.mydomain.com)
RewriteCond %{HTTP_HOST} ([^.]+)\.localhost
RewriteRule ^(.*)$ s/index.php?s=%1
Have no idea how to proceed further. This is what i have :
RewriteCond %{HTTP_HOST} ([^.]+)\.localhost\([^.]+)\
RewriteRule ^(.*)$ s/page.php?name=%1&s=%2
Appreciate any expert help. 🙂
You don’t need to rewrite subdomains
Rewrite only request uri and be fine.