[Bug?] Why accessing www.doe.com/john (without trailing /) will redirect to doe.com/john?

7 posts / 0 new
Last post
#1 Thu, 05/17/2007 - 07:12
ah...lifes...good

[Bug?] Why accessing www.doe.com/john (without trailing /) will redirect to doe.com/john?

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?

Thanks.

Sun, 06/07/2009 - 07:03
DanLong

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?

Sun, 06/07/2009 - 07:03
ah...lifes...good

Jamie provided the solution:

This is actually an Apache configuration issue. To fix it, do the following :

1) Go to Webmin's Apache Webserver module.
2) Click on the Default Server link
3) Click on Networking and Addresses
4) Change 'Use hostname supplied by browser' to 'Yes'
5) Click on Save
6) Click on Apply Changes

Sun, 06/07/2009 - 07:03
ah...lifes...good

Hi Dan,

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. ;-)

Sun, 06/07/2009 - 07:03
ah...lifes...good

Jamie's solution (above) solved the issue. But I was wondering what exact change is needed on httpd.conf.

Sun, 06/07/2009 - 07:03
DanielLlewellyn

I believe that option sets the "usecanonicalname off" setting globally in httpd.conf

Sun, 06/07/2009 - 07:03
ah...lifes...good

Thanks Daniel.

Topic locked