Jump to content

Address needs trailing /


Kaotic

Recommended Posts

quick question,

 

I have a domain that if you type http://www.domain.com/subdir/ the domain comes up just fine.  however if I remove the trailing / it will still work great but remove the www. from the address

 

so if you type:

http://www.domain.com/subdir/

you get to browse

http://www.domain.com/subdir/

 

but if you type:

http://www.domain.com/subdir

you end up getting

http://domain.com/subdir/

 

I have a client that wants it to leave the www weather or not you have the trailing slash.  I have never seen this before I was hoping someone else ran into this and knows of a quick fix.

Link to comment
https://forums.phpfreaks.com/topic/44413-address-needs-trailing/
Share on other sites

In your vhost entry make sure that your:

ServerName www.website.com

 

You can add an alias such as:

ServerAlias website.com

 

if you want both to work. So far as Im aware apache will default to redirecting to the ServerName rather than the Alias.

 

Its just something to try.

 

-steve

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.