Support » Fixing WordPress » Redirect to https WITH www EXCEPT for /blogs/*

  • jetlej

    (@jetlej)


    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]
  • The topic ‘Redirect to https WITH www EXCEPT for /blogs/*’ is closed to new replies.