scriptstalk
09-02-2002, 12:25 PM
Hi,
Her is the problem
this domain works fine
http://www.domain.com/test/
this is not working
http://www.domain.com/test
where do I configure to run work both proberly.
Thanks
mind21_98
09-02-2002, 12:52 PM
If your domain is resolving, both should be working. Try this line in your <VirtualHost> block:
ServerAlias domain.com www.domain.com
ThaiZone
09-02-2002, 10:24 PM
Check out if you use MultiViews directive
Change it to -MultiViews
Options -MultiViews
Jimmy
tribby
09-02-2002, 10:42 PM
Also, make sure that in the <VirtualHost> block you have this entry:
ServerName www.domain.com
Because when Apache sees a directory without a trailing slash, it will automatically forward you to the ServerName + the request URI
MotleyFool
09-03-2002, 05:46 AM
thats because /test is a directory and Apache doesn't know how to handle it.. whereas /test/ asks Apache to serve the contents of ../test/ and based on the DirectoryIndex directive it throws up either index.html or whatever is there in /test/
If you want /test also to work Put
Alias /test ~/test/index.html
in httpd.conf and restart Apache
KualoJo
09-04-2002, 05:17 AM
If you want /test also to work Put
Alias /test ~/test/index.html
in httpd.conf and restart Apache
But wouldn't that be the case if only /test was the directory not working? What if all the directories on the server were doing this?
MotleyFool
09-04-2002, 05:42 AM
I didn't quite understand the question! :)
As far as I know, that is the way for Apache to recognize what you are requesting. The correct way to call a file is to call
www.somenonsense.com/directory/filename.extn
but you can save some typing by putting a DirectoryIndex directive and make filename.extn as the default.
If you want
www.somenonsense.com/anydirectory
to show the default file[s] in that directory I dont know how to do it :)