Redirect using mod_rewrite

if you are trying to redirect any subdomain request to the root, try the following method. The URL will not change in the address bar.

RewriteCond %{HTTP_HOST} ^business\.rootdomain\.com
RewriteCond %{REQUEST_URI} !^/business/
RewriteRule (.*) http://www.rootdomain.com/business/$1 [P]

if you get any internal error, add proxy & proxy http modules to Apache.

restart the web server,it should work now.

0 comments



Some Links (off programming)