WordPress.org

Ready to get started?Download WordPress

Forums

Text widget and https rewrite (1 post)

  1. Francesco
    Member
    Posted 11 months ago #

    I'm happy to have this block

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{SERVER_PORT} !^443
    RewriteRule ^(.*) https://%{HTTP_HOST}/$1 [R,L]
    </IfModule>

    in my .htaccess

    At first I believed it rewrites also the external links. Because if I've a link to (say) http://www.google.com and I've this: <a href="http://www.google.com">Google.com</a> in my html code, then I've https://www.google.com when I load the page.

    Now imagine that google.com does not have the SSL, consequently, the link results broken and I can't reach google.com.

    I've this problem in a text wordpress widget, I double checked with a html file and the http remains http... so the problem it's probably related to a wordpress setting.

    Maybe I'm wrong, but I think it depends on permalink settings:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    Is there a way to resolve this issue?

Reply

You must log in to post.

About this Topic