I’ve been trying to get a subdomain to resolve to a subdirectory. i.e., ‘foobar.mydomain.net’ resolves to ‘mydomain.net/foobar.mydomain.net’. I’m using the following mod_rewrite rule:
RewriteCond %{HTTP_HOST} ^foobar.mydomain.net [NC]
RewriteCond %{REQUEST_FILENAME} !foobar.mydomain.net/
RewriteRule ^(.*)$ /foobar.mydomain.net/$1 [L]
This correctly rewrites my request. However, upon landing at the page, I am repeatedly presented with our ‘Access Denied’ page, no matter how many times I log in correctly. I know it’s landing at the correct page because when I change the access settings on the landing template, the change is reflected in ‘foobar.mydomain.net’s behavior.
mydomain.net/foobar.mydomain.net/index.php is a clone of mydomain.net/index.php, with all applicable path settings updated, and appropriate template group, template, and homepage_entry_id values assigned. Navigating directly to mydomain.net/foobar.mydomain.net behaves correctly, it’s just this redirection that has ExpressionEngine confused. Any help would be appreciated.