[英].htaccess HTTPS redirect with exceptions
I am looking for a .htaccess code to redirect HTTPS requests on a certain url/page to HTTP (without SSL, yes the otherway around). 我正在寻找.htaccess代码,以将特定网址/页面上的HTTPS请求重定向到HTTP(没有SSL,反之则是)。
Please help. 请帮忙。
Enable mod_rewrite
and .htaccess
through httpd.conf
(if not already enabled) and then put this code in your DOCUMENT_ROOT/.htaccess
file: 通过
httpd.conf
启用mod_rewrite
和.htaccess
(如果尚未启用),然后将此代码放入DOCUMENT_ROOT/.htaccess
文件中:
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule ^surf\.php$ http://%{HTTP_HOST}%{REQUEST_URI} [L,NC,R=301]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.