I'm forcing HTTPS on my site using mod_rewrite but I want to change this to HTTP for any URL with the substring com_bookmangement in the URL.
So
http://www.example.com/index.php?option=com_content&view=article&id=85&Itemid=140
will be directed to
https://www.example.com/index.php??option=com_content&view=article&id=85&Itemid=140
BUT
https://www.example.com/index.php?option=com_bookmanagement&controller=localbooks&Itemid=216
will be directed to
http://www.example.com/index.php?option=com_bookmanagement&controller=localbooks&Itemid=216
I've tried this without success:
#rewrite everything apart from com_bookmanagement to HTTPS
RewriteCond %{SERVER_PORT} !443
RewriteCond %{REQUEST_URI} !com_bookmanagement=
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
#rewrite vouchers views to http
#RewriteCond %{server_port} 443
RewriteCond %{REQUEST_URI} ^com_bookmanagement=
RewriteRule ^/(.*)$ http://www.example.com/$1 [R=301,L]
Any ideas?