redirect http to https
Hi,
how to redirect automatically from http://test.yan.com to https://test.yan.com. we configured the ssl on test.yan.com in apache. if https://test.yan.com,it is working. if http://test.yan.com,it is not working and auotmatically redirected. how to solve that |
You can use mod_rewrite:
Code:
RewriteEngine on |
Quote:
|
In you case, since you want to redirect all the traffic in https, it's better to put it inside the Directory definition of your DocumentRoot. I..e, if you have an entry "DocumentRoot /var/www", then you have to put it inside the <Directory /var/www>...</Directory> part.
But it can go everywhere, even inside a .htaccess. Regards |
All times are GMT -5. The time now is 10:59 AM. |