I noticed there a strange phenonmenon with websites created with VMpro.
When you access http://www.doe.com/john (without / at the back of the URL), you will be redirected to http://doe.com/john/ (notice www is removed).
If you access http://www.doe.com/john/ (with the trailing /), everything works as normal i.e. without the redirection).
Can anybody tell me why? Is it because of certain directives in httpd.conf? How do I stop the redirection to URL without the www?
I wasn’t able to duplicate the problem with either IE or Mozilla browsers, though I’m not sure what the problem is. Are you trying to run an intranet and an Internet on that server?
Jamie provided the solution:
This is actually an Apache configuration issue. To fix it, do the following :
- Go to Webmin’s Apache Webserver module.
- Click on the Default Server link
- Click on Networking and Addresses
- Change ‘Use hostname supplied by browser’ to ‘Yes’
- Click on Save
- Click on Apply Changes
The problem is, some scripts I run are very anal about having www. in the URL. If www is missing, some things don’t work. Don’t ask me why. I don’t know either. I’m just a lowly end-user.
Jamie’s solution (above) solved the issue. But I was wondering what exact change is needed on httpd.conf.
I believe that option sets the "usecanonicalname off" setting globally in httpd.conf