Htaccess redirect https to http for all pages except homepage, redirect https for homepage to another url

Viewed 829

I am trying to redirect all https request to http excluding the homepage but i also want the https request for homepage to redirect to another url.

here is what i have in my .htaccess right now

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !^/$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]

the rule above redirects everything except homepage but i want the homepage redirected to another url e.g

https://www.example.com/ 
redirects to
http://www.example.com/non-secured-page

i need a full .htaccess rule that can do this.

1 Answers
Related