Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

cPanel redirect tool is errant - redirect loop error

Discussion in 'General Discussion' started by jols, Jul 18, 2009.

  1. jols

    jols Well-Known Member

    Joined:
    Mar 13, 2004
    Messages:
    1,111
    Likes Received:
    2
    Trophy Points:
    168
    This did not used to be the case. But now if you use the cPanel redirects tool to redirect traffic to a subdirectory you will get a redirect loop error.

    Here are the results of using the redirect tool that show up in the root web .htaccess file:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^.*$
    RewriteRule ^.*$ "http\:\/\/www\.domain\.com\/subdirectory\/" [R=301,L]


    To avoid the redirect loop error, I have to manually change the above to the following:

    RewriteEngine On
    RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^domain.com/$ [NC,OR]
    RewriteCond %{HTTP_HOST}%{REQUEST_URI} ^www.domain.com/$ [NC]
    RewriteRule ^(.*)$ http://www.domain.com/subdirectory/$1 [r=301,nc]


    This of course leads to a number of unnecessary support calls throughout the week when our hosted customers try to do the redirect using the cPanel tool. Can anyone here suggest a resolution for a fix? Should I make a bug report or something like that? Or, is there a control or parameter file we can edit so that these redirects do not end up in loops?
     
  2. cesarlwh

    cesarlwh Well-Known Member

    Joined:
    Sep 23, 2008
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    56
    same problem on 4 servers
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,309
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice