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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.