The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Trailing slash issue

Discussion in 'General Discussion' started by pixelsoup, Feb 21, 2008.

  1. pixelsoup

    pixelsoup Registered

    Joined:
    Dec 21, 2005
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    151
    Hello everyone,


    I have discovered something unusual with my server in regards to how it handles urls without a trailing slash /

    If the url has a sub folder in it, you must have the trailing slash in the url or it drops the www prefix. So if you navigate to www.dashingdishes.com/winnipeg , and you don't include the / slash, it will convert it to http://dashingdishes.com/winnipeg/

    If you include the trailing slash , http://www.dashingdishes.com/winnipeg/ then the url stays the way it is.

    Is there a setting on the server to disable or prevent this from happening?

    Note this is a server wide issue and not specific to any one domain.
     
  2. EWD

    EWD Well-Known Member
    PartnerNOC

    Joined:
    Aug 19, 2003
    Messages:
    165
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    NY
  3. handsonhosting

    handsonhosting Well-Known Member

    Joined:
    Feb 17, 2002
    Messages:
    151
    Likes Received:
    0
    Trophy Points:
    316
    Location:
    Omaha, NE
    cPanel Access Level:
    Root Administrator
    Hey Guys,

    Anyone find a resolution to this?
     
  4. david510

    david510 Well-Known Member

    Joined:
    Aug 22, 2004
    Messages:
    473
    Likes Received:
    0
    Trophy Points:
    166
    Add the following inside the .htaccess file of the domain under public_html folder and have a check.

    Code:
    RewriteEngine On
    RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L] 
    
     
Loading...

Share This Page