You can redirect browser to use SSL secure port using .htaccess file with Rewrite Rules.
Create a .htaccess file with the below Rewrite rule.
Options +FollowSymLinks RewriteEngine On RewriteCond %{SERVER_PORT} !=443 RewriteRule ^ https://secure.yourdomain.com%{REQUEST_URI} [NS,R,L]
- sandip's blog
- Login or register to post comments
Comments
If you don't have "NS" (Not for internal Subrequests) in the rewrite rule, it may re-write internally and not pass it the redirect as desired. To debug, turn on rewrite logging via:
RewriteLog /var/log/httpd/rewrite_log
RewriteLogLevel 3