I’ve got several domains pointing at a single hosting account. They all drop into the same folder. From there, I want each domain I specify to be re-mapped to a sub-folder, and have all other domains be mapped to another sub-folder. Here’s my test setup:
#two domains served from one root..
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} .*
RewriteCond %{REQUEST_URI} !^/all
RewriteRule ^(.*)$ /all/$1 [L]
RewriteCond %{HTTP_HOST} dev.mydomain.com
RewriteCond %{REQUEST_URI} !^/dev
RewriteRule ^(.*)$ /dev/$1 [L]
What I was expecting is that the ‘dev’ sub-domain would be re-mapped to the /dev/ directory, and that all other domains would be re-mapped to the /all/ folder. The first block works great: It redirects everything to the /all/ folder.
The second block doesn’t work so great. I get this error:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
I’m stumped. Anybody know what I’m doing wrong?
Thanks in advance!