htaccess – How to redirect all http (port 80) requests to https (port 443)
Sometimes you may need to redirect http requests on port 80 to (https) on port 443. This can easily be accomplished with .htaccess.
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [NC,R,L]
-
Beware the heat-seeking Nerf machine-gun coming to a cubicle near you http://om.ly/svHF #fb
- Follow me
Last Tweet
-
Archives
Categories
My Favorites
- 37 Signals
- Andrew Warner
- Chris Coyier
- Chris Shiflett
- Collis Ta'eed
- Development Seed
- Drupal
- HubSpot
- James Padolsey
- Joel On Software
- John Resig
- jQuery
- Kevin Rose
- Life Hacker
- Magento
- Mashable
- Matt Cutts
- Matt Ryan
- MySQL
- NetTuts
- Noupe
- Photoshop Tutorials
- PHP
- Smashing Magazine
- Tech Crunch
- WoorkUp
- Wordpress
