0

I know this question has been asked a lot of times but I don't know why this is still not working for me.

# force https:// for all except some selected URLs    
RewriteCond %{HTTPS} off
RewriteCond %{THE_REQUEST} !/freezer-rack-configurator-demo/ [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

# force http:// for selected URLs
RewriteCond %{HTTPS} on
RewriteCond %{THE_REQUEST} /freezer-rack-configurator-demo/ [NC]
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

I need all urls to be https and it's working no problem. However the url "freezer-rack-configurator-demo" is still being forced to have https when I need it to be http only. Would someone also guide me how to do this with multiple urls. I'm really terrible with htaccess.

Thanks in advance.

Alex Tartan
  • 6,736
  • 10
  • 34
  • 45
  • Please see http://stackoverflow.com/questions/6009530/mod-rewrite-the-request-and-request-uri-or-request-file-give-different-filenam, you probably meant to use REQUEST_URI, not THE_REQUEST – Joe Jan 12 '16 at 09:05
  • Well that was embarrassing, however I changed it to uri and still nothing. –  Jan 12 '16 at 09:09
  • Enable logging (http://stackoverflow.com/questions/7738170/how-to-debug-htaccess-rewrite-script) and see what is matching or not. – Joe Jan 12 '16 at 21:40

0 Answers0