jds43 Posted November 10, 2015 Share Posted November 10, 2015 I'm trying to append ProcessWire's default htaccess file to redirect all SSL requests to a NON-SSL version of the requested page. This should work, but it doesn't: RewriteEngine On RewriteCond %{HTTPS} on RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] Could PW be overriding it? Link to comment Share on other sites More sharing options...
netcarver Posted November 11, 2015 Share Posted November 11, 2015 PW already has a mechanism built in that should handle this for you. Edit your templates and look for the URL tab. In the "Scheme/protocol" section choose "HTTP only" and save the change. Repeat for all your templates and you should be set. Hope that helps. Link to comment Share on other sites More sharing options...
jds43 Posted November 11, 2015 Author Share Posted November 11, 2015 Thanks, but this feature doesn't appear to kick in in time to prevent my server from attempting to load the SSL certificate. I believe I need an .htaccess solution which will redirect the URL BEFORE ProcessWire is called. Link to comment Share on other sites More sharing options...
LostKobrakai Posted November 11, 2015 Share Posted November 11, 2015 In the processwire htaccess look for these lines # ----------------------------------------------------------------------------------------------- # If you only want to allow HTTPS, uncomment the RewriteCond and RewriteRule lines below. # ----------------------------------------------------------------------------------------------- # RewriteCond %{HTTPS} off # RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L] and just add yours after those, as this must certainly be the right place to put those redirections # ----------------------------------------------------------------------------------------------- # If you only want to allow HTTP # ----------------------------------------------------------------------------------------------- RewriteCond %{HTTPS} on RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [L] 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now