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!

301 Redirection almost done...

Discussion in 'Bind/DNS/Nameserver' started by Flegm, Apr 18, 2015.

  1. Flegm

    Flegm Member

    Joined:
    Apr 18, 2015
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    France
    cPanel Access Level:
    Root Administrator
    Hello, i've a little problem on my configuration :(
    I found a lot of answers for a lot of questions but not for mine !

    I went to cPanel > Domains > Redirects to have my non-www domain redirected to www.domain and it's working fine (permanent/generic). But when i'm trying to access to any other page or file like www.domain.com/blog or www.domain.com/sitemap_index.xml i get an 500 internal server error.

    Anyone can tell me if i forget somehting please ?
    Thanks !
     
    #1 Flegm, Apr 18, 2015
    Last edited: Apr 18, 2015
  2. madmanmachines

    madmanmachines Well-Known Member

    Joined:
    Nov 28, 2014
    Messages:
    94
    Likes Received:
    4
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hi,

    Checking the Apache error log(/usr/local/apache/logs/error_log) should provide some guidance.

    Thanks,
     
  3. Flegm

    Flegm Member

    Joined:
    Apr 18, 2015
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    France
    cPanel Access Level:
    Root Administrator
    [Sat Apr 18 13:45:57 2015] [error] [client xx.xx.xx.xx] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

    It's strange, i only have set one redirection.
     
  4. madmanmachines

    madmanmachines Well-Known Member

    Joined:
    Nov 28, 2014
    Messages:
    94
    Likes Received:
    4
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    You likely have multiple '.htaccess' files in place. You should start by checking your user-root(/home/usernamehere/). You can also use the command below to search for them:
    Code:
    find /home/usernamehere/ -type f -name .htaccess
     
  5. Flegm

    Flegm Member

    Joined:
    Apr 18, 2015
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    France
    cPanel Access Level:
    Root Administrator
    Oh, i found more than one but most of them are ok but i've a wordpress installation in a subfolder of public_html. index.php points to this subfolder with :
    require( dirname( __FILE__ ) . '/WordPressSubFolder/wp-blog-header.php' );

    I removed the .htaccess in the subfolder and only the public_html one is active now. I tried the redirection and no more 500 error... This is Great !

    Thank you very much !
     
    #5 Flegm, Apr 20, 2015
    Last edited: Apr 20, 2015
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    I am happy to see the issue is now resolved. Thank you for updating us with the outcome.
     
    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