Monday, November 28, 2011

How to redirect http to https using .htaccess on SuSE

1. install apache2-worker module
#yast -i apache2-worker
2. load apache mod_rewrite module
by add the following line to /etc/apache2/httpd.conf
LoadModule rewrite_module /usr/lib/apache2/
3. edit your .htaccess with correct IP address and directory
kcuf:/srv/www/htdocs/dara # cat .htaccess
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} dara
RewriteRule ^(.*)$$1 [R,L]

Make sure that you have configure that directory or address use with https already.

- My IP address
- My directory is dara


No comments:

Post a Comment