Home Forums General issues Redirection works …. except for the first page

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #16322 Reply
    Cyril Arnaud
    Guest

    Everything seems to work except for the front page
    If I enter http://ariolix.com I’m redirected to https://ariolix.com/ariolix.com

    If I enter any other address including a dummy address http://ariolix.com/?type=1 it works perfectly

    I cleared the cache, checked for plugin interference … I don’t know what to check now ….
    Any idea ?

    #16323 Reply
    Cyril Arnaud
    Guest

    No, even the dummy address doesn’t work, but any old blog post address works …

    #16329 Reply
    Rogier
    Keymaster

    There is probably another redirect active as well. This could be the caching. Something is redirecting your site to https://ariolix.com/ariolix.com/index.php.

    Please clear and deactivate any caching plugins you might have. Especially if you have W3TC running, that plugin doesn’t always clear as you’d expect.

    If you have any .htaccess code other than the default WP and the Really Simple SSL redirect, please comment it out to see what happens.

    Other possible causes: multilanguage plugins and redirect plugins.

    #16371 Reply
    Cyril
    Guest

    I deactivated all the plugins including WP-cache, Polylang, Quick Page/Post Redirect Plugin, WP Maintenance Mode, YOAST
    I deleted .htaccess to let it be rebuild by wordpress and Really Simple SSL

    Nothing worked 🙁

    Just a thought (i don’t know if that has any link)
    I installed my site in the folder ariolix on my public_html root.
    I have a .htaccess on the root with this inside :

    # Do not change this line.
    RewriteEngine on
    # Change yourdomain.com to be your primary domain.
    RewriteCond %{HTTP_HOST} ^(www.)?ariolix.com$
    # Change ‘subfolder’ to be the folder you will use for your primary domain.
    RewriteCond %{REQUEST_URI} !^/ariolix.com/
    # Don’t change this line.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    # Change ‘subfolder’ to be the folder you will use for your primary domain.
    RewriteRule ^(.*)$ /ariolix.com/$1
    # followed by / then the main file for your site, index.php, index.html, etc.
    RewriteCond %{HTTP_HOST} ^(www.)?ariolix.com$
    RewriteRule ^(/)?$ ariolix.com/index.php [L]

    My guess is that there is an interference between the two.

    Any thought ?

    #16399 Reply
    Rogier
    Keymaster

    Hi, I’m pretty sure that is the cause. Maybe your hosting company knows how to adapt it so it works on SSL?

    I’ve seen it before, but have to look through my emails to see if I can find how we solved it last time. Will be at the end of the day.

    #16413 Reply
    Rogier
    Keymaster

    I see there’s a condition in your .htaccess:
    RewriteCond %{REQUEST_URI} !^/ariolix.com/

    which seems to prevent this redirect working when /ariolix.com/ is already in the url. This would prevent double redirects, as you’re experiencing now.

    Maybe it would help if you add this line also to the really simple SSL redirect.

    First, enable “stop editing the .htaccess file” in settings/ssl.

    Then add this line.

    Let me know if that helps!

    #16433 Reply
    Cyril
    Guest

    I have modified the last line in the .htaccess file in public_html from
    RewriteRule ^(/)?$ ariolix.com/index.php [L]
    to:
    RewriteRule ^(/)?$ https://ariolix.com/index.php [L]
    and now when I type ariolix.com I am redirected to the site with https.

    Then I had too many redirects errors.

    So I removed the really-simple-ssl .htaccess code and activated only the javascript redirect.
    Now everything work.

    What is the downside of not using .htaccess redirect ?

    Thanks

    #16461 Reply
    Rogier
    Keymaster

    When I load your page, I still get too many redirects.

    If it works without the .htaccess, that’s good of course, but redirecting to https with javascript is slow.

    Did you try my suggestion inserting that extra condition after the first condition in Really Simple SSL?

    #16509 Reply
    Cyril
    Guest

    Yes I did.
    I don’t know what else to try 🙁

    #16546 Reply
    Rogier
    Keymaster

    Something else I’d like to try, using the original Really Simple SSL redirect, but changing the redirect to

    #redirecting only requests that already have been redirected to the subdirectory
    RewriteRule ^(subdirectory/.*)$ https://www.mydomain.com/subdirectory/$1

    So if you originally had this:

    RewriteEngine on
    RewriteCond %{HTTPS} !=on [NC]
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    It would now look like this:

    RewriteEngine on
    RewriteCond %{HTTPS} !=on [NC]
    RewriteRule ^(subdirectory/.*)$ https://www.mydomain.com/subdirectory/$1 [R=301,L]
Viewing 10 posts - 1 through 10 (of 10 total)
Reply To: Redirection works …. except for the first page
Your information: