• Divvy

    (@divvy)


    Hello guys,

    Today I have installed SSL in my domain.
    Now I want to redirect all https:// to https://
    But I’m having some problems…

    For example, If I add this code:

    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    I think I have conflicts because of this one:
    RewriteCond “%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%`{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html” -f
    RewriteRule .* “/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html” [L]`

    Can someone give me a little help how to add redirect in my htaccess file correctly?
    My file: https://paste2.org/4Ia8bpyZ

    Hope someone can help me, thanks!

    Kind Regards,
    Tim

Viewing 2 replies - 1 through 2 (of 2 total)
  • benoitroubert

    (@benoitroubert)

    Maybe I will be able to help you.

    W3 Total Cache write all its instructions at the beginning of .htaccess file.

    We had also this kind of problem because our own instructions in .htaccess for the https:// ? https:// redirection appeared after W3 total Cache job.

    So pages were constructed with https:// links if the case you asked the page in https:// and not https://; and only after, was switching to https://.

    So go see your .htaccess file and put this code below at the beginning of your .htaccess file:

    #######################################################
    # INFOMANIAK
    #######################################################
    # REDIRECT HTTP TO HTTPS TO AVOID DUPLICATE CONTENT #
    #######################################################

    RewriteEngine on
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteRule (.*) https://www.site.com/$1 [R=301,L]

    ######################################################

    Hope it will work for you.

    Thread Starter Divvy

    (@divvy)

    Hey buddy,

    Thank you for your reply and for trying to help me.
    I already tried that and didn’t worked, thank you anyway.

    I think that is related with mod_pagespeed :/
    Is there anyone here familiar with this mod that could help me please?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Need help with my .htaccess file’ is closed to new replies.