Redirecting non ssl requests to ssl version of your site
- October 12th, 2007
- apache
Sometimes you might want your clients to run only through your ssl protected version of your homepage or shop. In this case it is necessary to redirect all visitors that open the http:// based (non ssl) url of your site to the https:// based (ssl protected) url of your site. The following snipplet for your apache vhost configuration does exactly this.(via )
RewriteEngine on RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]
















Submit your comment