I have a Website. Where I need to redirect all the pages from HTTP to HTTPS. But there are two page which should not served over HTTPS.
- Home Page - www.hellomysite.com
- Dealers Page -www.hellomysite.com/dealers
Even if user has entered the url as https://www.hellomysite.com/dealers, it should be served over HTTP. http://www.hellomysite.com/dealers
I googled & found number of links but none of them is redirected.
.htaccess
#Redirect all request to HTTPS
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} ^www.hellomysite\.com*
RewriteRule ^(.*)$ https://hellomysite.com/$1 [L,R=301]
#RewriteCond %{HTTPS} on [OR]
#RewriteRule ^https://hellomysite.com/dealers$ http://hellomysite/dealers [R=301,L,QSA]
If I try anything more, then I get an error on opening the site as
This website has too many redirects
How do I redirect Home Page & the dealers page to HTTP.