I have the following working rules in my httpd.conf for redirecting http to https based on the URI:
### Redirect port 80 to port 443 (ssl) for secure content
RewriteCond %{SERVER_PORT} ^80$
RewriteCond %{REQUEST_URI} ^.*(password|phpmyadmin).*$ [NC]
RewriteRule ^.*$ [L]
I can't get the inverse rule to work, which i want to use to move people from https to http for non-secure content:
### Redirect port 443 to port 80 for all NON password protected pages
RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{REQUEST_URI} !^.*(password|phpmyadmin).*$ [NC]
RewriteRule ^.*$ [L]
Any assistance would be appreciated.
### Redirect port 80 to port 443 (ssl) for secure content
RewriteCond %{SERVER_PORT} ^80$
RewriteCond %{REQUEST_URI} ^.*(password|phpmyadmin).*$ [NC]
RewriteRule ^.*$ [L]
I can't get the inverse rule to work, which i want to use to move people from https to http for non-secure content:
### Redirect port 443 to port 80 for all NON password protected pages
RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{REQUEST_URI} !^.*(password|phpmyadmin).*$ [NC]
RewriteRule ^.*$ [L]
Any assistance would be appreciated.