Forum Moderators: phranque

Message Too Old, No Replies

Strange redirect

odd default behaviour

         

Umbra

4:23 pm on Jul 6, 2006 (gmt 0)

10+ Year Member



I just noticed an odd default behavior with Linux Apache:

I type this into the browser --> and see this...
www.domain.com/dir/ --> [domain.com...]
www.domain.com/dir --> [domain.com...]

I recognize that /dir/ is treated as an index file, and /dir is treated as a folder...

I also know this can be overcome with an htaccess redirect...

Still, why on earth would Apache feel it needs to lop off the "www" from the URL in the latter case?

jdMorgan

7:08 pm on Jul 6, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is mod_dir in action, combined with UseCanonicalName on and a non-www ServerName, most likely.

If you correct the servername to your preferred "www" name, and disable UseCanonicalName, you'll likely be happier.

Jim