This is a discussion on Rewriting subdomains within the Apache Web Server forums, part of the Web Server and Related Forums category; Hi All My hosting provider doesn't have rewrite logging turned on, so I'm flying blind on this problem. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi All
My hosting provider doesn't have rewrite logging turned on, so I'm flying blind on this problem. I am trying to implement a structure where I have: A domain host1.com on a shared hosting provider. A virtual domain host2.com pointing to the same IP address as host1.com. A directory structure host1.com app www docroot demo docroot test docroot dev docroot I want to map http://test.host2.com => host1.com/app/test/docroot (similarly for www, demo, and dev). There is more path to the absolute root above host1.com I have been trying variations of: RewriteEngine On Options FollowSymLinks ExecCGI -Multiviews RewriteBase host1.com RewriteCond %{HTTP_HOST} ^(.*)\.app\.com$ RewriteRule ^.*$ /host2.com/app/%1/docroot/index.html Is there a stock solution to this problem? Thanks. Jim Rootham |