kieranbarnes Independent PHP, WordPress & CubeCart Programmer

[Snippet] Redirecting Non-SSL Traffic to SSL

Posted on June 15, 2010
  1. RewriteEngine On
  2. RewriteCond %{HTTPS} off
  3. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}


Related posts

  1. Redirecting non-www to a www prefix
    This old chestnut again. Create or edit the .htaccess file...
  2. Redirect a www prefixed site to a non-www prefix
    I like clean URLs. Add this to your .htaccess in the site root RewriteEngine on...
  3. Apache redirects based on IP Address/Subnet
    Ever needed to redirect a source IP address or source subnet in apache? Why? Redirect...
  4. .htaccess redirect based on requested domain
    Imagine you have a selection of domain names that point to the same site, are...
  5. mod_geoip Revisted including stopping spam in phpBB 2
    I've recently moved a client's forum onto a new cPanel server, previously it was on...

Posted by Kieran


Filed under: Apache Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

No trackbacks yet.