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 help (can't get it to work)

Discussion in 'General Discussion' started by Serees, Mar 27, 2008.

  1. Serees

    Serees Registered

    Joined:
    Mar 27, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi, i have the folowing rewrite rules in my .htaccess file
    Code:
    Options +FollowSymlinks
    RewriteEngine On
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -d [OR]
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} -f
    RewriteRule ^(.*)$ - [L,NS]
    RewriteCond %{QUERY_STRING} !^$
    RewriteRule ^/(.*)/(.*)/$ /index.php?&page=$1&sub=$2&%{QUERY_STRING} [L,NS]
    RewriteRule ^/(.*)/(.*)/$ /index.php?&page=$1&sub=$2 [L,NS]
    RewriteCond %{QUERY_STRING} !^$
    RewriteRule ^/(.*)/$ /index.php?&page=$1&%{QUERY_STRING} [L,NS]
    RewriteRule ^/(.*)/$ /index.php?page=$1  [L,NS]
    RewriteRule ^/([^/]*)/(.*)$        /$2     [NS,N]
    
    The rules are correct they have been working for ages on my old machine. But since I migrated to C-Panel i can not get them to work...

    Any help?

    Thanks
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Long story short, you should contact your hosting provider regarding this issue as they can assist you with the specific reason these rules may not be working by checking their logs or referring you to logs you may be able to review yourself.
     
Loading...

Share This Page