2011-05-20 24 views
0

我在网上搜索了4个小时,并尝试了一切,但没有任何工作。将HTTP URL转换为HTTPS url(只有一个url)

所有我想要做的是诺玛URL重定向力到HTTPS URL,使用的.htaccess,例如:

我想,当人访问: - http://www.mydomain.com/index.php?option=com_dms&task=checkout&Itemid=816

参见: - https://www.mydomain.com/index.php?option=com_dms&task=checkout&Itemid=816

这几乎所有,我希望这很简单。

感谢您提前给出答案!

回答

0

要只为您的网址做到这一点,这应该工作:

RewriteEngine On 
RewriteCond %{HTTPS} !=on 
RewriteRule ^http://www\.mydomain\.com/index\.php?option=com_dms&task=checkout&Itemid=816$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] 

通过更换URL *所有流量。