• Resolved giancarlo15

    (@giancarlo15)


    Hello,
    today I’m trying to add permalinks on my website and they are working well, except for the Homepage where it says ERR_TOO_MANY_REDIRECTS if I use this link to go into the homepage “www.website.it”. If I use this sintax “www.website.it/home”, the website loads the page. How can I fix this error?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi,

    I see you are using Nginx. Do you use Apache (or any other web server) also behind Nginx? Your issue is looking like you are off-loading your SSL traffic on Nginx and WordPress has no idea about that and is trying to server plain HTTP traffic. Check how you configured your Home and SiteURL values and additionally try to add this to your wp-config.php file:

    if ($_SERVER[‘HTTP_X_FORWARDED_PROTO’] == ‘https’) $_SERVER[‘HTTPS’]=’on’;

    Thread Starter giancarlo15

    (@giancarlo15)

    Yes I’m using Apache and it seems everything is okay when I check Home and SiteURL (when i join into Home page it shows me the right link “https://centroveterinariospecialisticolocovet.it/”, but it can’t load it.

    Then yes; neither Apache, nor WordPress are not “aware” Nginx is off-loading SSL traffic, so you need to tell the this is the case. Put the following at the bottom of the wp-config.php file and I think it should solve your issue:

    define(‘FORCE_SSL_ADMIN’, true);
    define(‘FORCE_SSL_LOGIN’, true);
    if ($_SERVER[‘HTTP_X_FORWARDED_PROTO’] == ‘https’)
    $_SERVER[‘HTTPS’]=’on’;

    Thread Starter giancarlo15

    (@giancarlo15)

    Even with this code I’m having the same problem, it seems an Error 301 looking logs only for that link

    Thread Starter giancarlo15

    (@giancarlo15)

    Ok problem solved, WP_Home and WP_SiteURL were written in CAPS. Now Homepage works fine.

    • This reply was modified 6 years, 9 months ago by giancarlo15.
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Problem with permalinks’ is closed to new replies.