Linux Manju

February 9, 2009

Apache http to https redirection

Filed under: FreeBSD, Linux — Tags: , , , , — admin @ 1:35 pm

I wanted to force all users to use https://mymailserver.com instead of http://mymailserver.com.

Open apache config file (   httpd.conf or apache2.conf  or sites-enabled/000-default  ?? )

Add these lines

RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}$1 [R,L]

/etc/init.d/apache2 restart

2 Comments »


  1. Pillspot.org. Canadian Health&Care.No prescription online pharmacy.Special Internet Prices.Best quality drugs. No prescription pills. Order drugs online

    Buy:100% Pure Okinawan Coral Calcium.Valtrex.Retin-A.Petcam (Metacam) Oral Suspension.Actos.Mega Hoodia.Human Growth Hormone.Synthroid.Arimidex.Zovirax.Accutane.Prevacid.Zyban.Prednisolone.Nexium.Lumigan….

    Trackback by JOHNNIE — July 4, 2010 @ 9:54 am

  2. Extension http://gcomputerslo.AUTOPARTSTHAI.INFO/tag/Cords+computer+Extension/ : computer…

    computer…

    Trackback by Cords — August 30, 2010 @ 7:49 am

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress