Forums

Redirect to https WITH www EXCEPT for /blogs/* (1 post)

  1. jetlej
    Member
    Posted 7 months ago #

    How can I redirect all pages within WordPress to https://www EXCEPT for URL's beginning with the slug /blogs/ and also a single page: /client-ipad-contest.

    I put the following code in my htaccess file after the wordpress-created lines, but nothing changed:

    RewriteCond %{HTTPS} off
    RewriteCond %{REQUEST_URI} !^/blogs/
    RewriteCond %{REQUEST_URI} !^/client-ipad-contest
    RewriteCond %{HTTP_HOST} ^(www\.)?(.*)$
    RewriteRule . https://www.%2%{REQUEST_URI} [R,L]
    
    RewriteCond %{HTTPS} on
    RewriteCond %{HTTP_HOST} ^(www\.)?(.*)$
    RewriteRule . https://www.%2%{REQUEST_URI} [R,L]

Reply

You must log in to post.

About this Topic