Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

About this user

Michael Hale michaelahale.com

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

Make sure your site (or directory) is SSL encrypted

Need a simple way to make sure all http requests get redirected to https?
This apache config snippet will redirect all requests at or below the specified location to its https equivilant.

<Location "/">
        RewriteEngine on
        Options +FollowSymLinks
        Allow from all
        RewriteCond %{SERVER_PORT} !^443$
        RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
</Location>
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS