Redirect from https to http except One folder

Support that you need to redirect all URL from https to http except one URL

Its very simple you just have to add below line above the redirection code

 

RewriteRule  ^foldername/  -  [L]

 

Then all the url except the foldername will be redirected from https to http

RewriteRule ^foldername/ - [L]
RewriteCond %{SERVER_PORT} ^443$
RewriteRule ^(.*)$ https://www.iserversupport.com/$1 [R=301,L]

 

Here all the URLs except https://www.iserversupport.com/foldername will be redirected to http

Leave a Reply

Your email address will not be published. Required fields are marked *