Forum Moderators: phranque
we currently have this in a development area on our site
www.mysite.com/development/
so when the subdomain is currently added to test it you have to go to blah.mydomain.com/development/ to see your page.
The issue is now when if you dont put a '/' after development example:
blah.mysite.com/development <--- missing /
apache seems to redirect us back to our site
www.mysite.com/
so unless a user puts in the / at the end of their subdomain it wont go to their section and redirect them to www.mysite.com
we arnt using htaccess for any of this and prefer not to since we have php code handling the subdomain creation.
our virtual host in apache settings for this site are
<VirtualHost x.x.x.x >
ServerAdmin webmaster@mysite.com
Servername www.mysite.com
ServerAlias *.mysite.com
CustomLog /usr/local/apache/logs/www.mysite.com-access.log sagi
#ErrorDocument 404 [mysite.com...]
ServerAlias *mysite.com
Documentroot /usr/home/http/mysite/
</VirtualHost>
so my question is how to resolve this, is this a apache config issue, how the dns handles subdomains, ie catch all domains..?
any thoughts?
Check your server config, though. I suggest trying the following settings:
Options -MultiViews
UseCanonicalName off
If you have Options [httpd.apache.org] MultiViews enabled or make a request to the server without a trailing slash, then the server will first try to resolve the request as a file request. Failing that, Apache mod_dir [httpd.apache.org] will append a trailing slash, so the request can be re-tried as a directory request. If UseCanonicalName [httpd.apache.org] is on, then the canonical ServerName will be used instead of the original client-requested hostname, and the result will be a redirect to your canonical (main) domain.
Jim