Mod_rewrite https validation

Fix it!!

Mod_rewrite https validation

Postby rsaldiva » Tue Oct 29, 2002 8:46 am

Hello: I need to define a rule that allows that whenever somebody accesa my site, instead of using HTTP uses HTTPS, if they are connected to my site HTTP, automatically the protocol is HTTPS The structure is:

<Directory "/Apache2/htdocs/segura">

SSLVerifyClient none
SSLVerifyDepth 5
SSLCipherSuite HIGH:MEDIUM

SSLCACertificateFile conf/ssl.crt/server.crt
SSLCACertificatePath conf/ssl.crt
SSLOptions +FakeBasicAuth
SSLRequireSSL

AuthName "User Secure"
AuthType Basic
AuthUserFile "/Apache2/bin/users"
Require valid-user

</Directory>

Please, Help Me...
rsaldiva
 

Postby Caterham » Sat Dec 11, 2004 3:07 am

use this in your directoty
Code: Select all
RewriteEngine On
RewriteCond %{SERVER_PORT} !443
RewriteRule ^/(.*)$ https://domain.com/$1 [R=301,L]


Bob :)
Caterham
 
Posts: 690
Joined: Fri Dec 10, 2004 1:30 pm


Return to Security with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 15 guests

cron