wordpress - Redirect all https to http, except 3 pages [htaccess / php] -


running wordpress site, therefore has own rule remove index.php links. furthermore, every time in url there "cache_img", specific rule applies.

what need:

  1. for current rules keep working
  2. in case url in https, rewrite http (301), except 3 pages (bookingstep1, bookingstep2, bookingsep3)

i suck @ htaccess, makes little no sense me, hope can me this. i'm open either htaccess or php solutions.

this have @ moment (and may have mistakes in it...)

rewriteengine on rewritebase / rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_uri} !^/(cache_img) [nc] rewriterule . /index.php [l] rewriterule ^cache_img/(.*)x(.*)-(.*)/r/(.*) cache_img/tt.php?src=http://mydomain.com/$4&w=$1&h=$2&zc=$3&q=100 

i tried adding @ top of htaccess:

rewritecond %{https} on rewritecond %{request_uri} !^bookingstep(1|2|3)\/?$ [nc] rewriterule ^(.*) http://mydomain.com/$1 [r=301,l] 

which works pages... removes https , rewrites them http. rewrite bookinstep* pages :(

please help! thank you!

give plugin go:

http://wordpress.org/plugins/wordpress-https

i use of time. can make every page https or can go individual pages/posts , make individually secure.

edit

rewriteengine on rewritecond %{server_port} =80 rewriterule ^bookingstep1/?$ https://url here/bookingstep1[r=301,qsa,l,ne] rewriterule ^bookingstep2/?$ https://url here/bookingstep2[r=301,qsa,l,ne] rewriterule ^bookingstep3/?$ https://url here/bookingstep3[r=301,qsa,l,ne] 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -