0

Possible Duplicate:
Force SSL/https using .htaccess and mod_rewrite

Hi i am new to mod rewrite htaccess, Can anyone help me to redirect each http:// request to https:// Thanks in advance.

Community
  • 1
  • 1
h_a86
  • 281
  • 1
  • 8
  • 16

1 Answers1

4

Simply put:

RewriteEngine On
# Rewrite all non-HTTPS requests to HTTPS.
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
Berry Langerak
  • 18,561
  • 4
  • 45
  • 58