pwired Posted February 23, 2015 Share Posted February 23, 2015 I bought a ssl certificate for a client for 30 euro per year. Now I have to update the .htaccess file so it will kick in. Google made me find 3 variants and now I don't know which one is the beste one. Since you guys have a lot of experience can anyone advise me which is the best one to use ? 1.RewriteEngine OnRewriteCond %{SERVER_PORT} !443RewriteRule (.*) https://www.example.com/require-secure/ [R] -------------------------------------------------------------2.RewriteEngine OnRewriteCond %{HTTPS} offRewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}-------------------------------------------------------------3.SSLRequireSSL#no non-ssl accessRedirect permanent /secure https://www.example.domain.com/secure ------------------------------------------------------------- And in the second one HTTP_HOST and REQUEST_URI are between { } Is that for variables ? Link to comment Share on other sites More sharing options...
isellsoap Posted February 23, 2015 Share Posted February 23, 2015 I would do it like it is written in the .htaccess file of the PW dev branch (line 104). I use this method on production sites, too, and it works smoothly. 6 Link to comment Share on other sites More sharing options...
pwired Posted February 23, 2015 Author Share Posted February 23, 2015 >>>isellsoap, thanks for the link. Edit: yes I got it working 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