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.

mod-rewrite acting funny...

Discussion in 'General Discussion' started by noimad1, Nov 12, 2007.

  1. noimad1

    noimad1 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    627
    Likes Received:
    0
    Trophy Points:
    16
    I just started having troubles with mod-rewrite on one of my customers sites. I'm not sure what is happening. I have a rewrite condition to force www in his url:


    # force www IN URL
    rewriteCond %{HTTP_HOST} !^www.hissite.com [NC]
    rewriteRule ^(.*)$ http://www.hissite.com/$1 [R=301,L]
    # END force www IN URL

    It seems to work ok for most things like if you go to http://hissite.com it redirects to http://www.hissite.com

    However, some pages don't work properly. For example if someone types in:

    http://hissite.com/temp

    it brings up a page can not be found error?

    Also, if he tries to redirect to his secure server:

    header("Location: https://www.hissite.com");

    It goes into a redirect loop, and the page fails?

    All this used to work previously, but we moved him to a new server running cpanel WHM 11.11.0 cPanel 11.15.0-C17588 and it started acting this way?

    Anyone have any ideas about this?
     
  2. noimad1

    noimad1 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    627
    Likes Received:
    0
    Trophy Points:
    16
    Anyone have any ideas on this one?
     
Loading...

Share This Page