• Hi to all, some guy decided to move the original site from the subdir /web to root, so everything shoul work from http://www.site.com instead of the index html redirect to http://www.site.com/web. It has his ssl cert and dns are in cloudflare. If the site is move back to /web folder works fine, but if you use the root you see how the site is in loop, because the icon tab blink.

    Any idea? I think it’s related with cloudflare, and can’t find a solution. IfI’m not wrong, i remember that need to add something to wp-config, is that possible?

    Any help is appreciated! thanks in advance. Robert

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator threadi

    (@threadi)

    Have you adjusted the URL in the backend? Take a look at the instructions here: https://developer.wordpress.org/advanced-administration/upgrade/migrating/#changing-the-site-url

    And yes, I assume that something also needs to be adjusted in Cloudflare. It’s best to ask their support about this.

    Thread Starter radians

    (@radians)

    yes, i have checked almost all. I believe that the problem is related with the htcaccess file.

    # BEGIN Really Simple SSL Redirect 5.3.4
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTPS} !=on [NC]
    RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
    </IfModule>

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteCond %{HTTP:CDN-LOOP} !cloudflare
    RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/
    RewriteCond %{HTTP_HOST} ^(www\.)?site\.com\.ar
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,QSA]
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /web/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /web/index.php [L]
    </IfModule>
    Moderator threadi

    (@threadi)

    If you follow the instructions above, you would also have the .htaccess file recreated as part of the customization. Of course, you can also simply delete the current one and have WordPress save it again via Settings > Permalinks.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Eternal Loop after move site to root directory with cloudflare’ is closed to new replies.