Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在寻找一个 .htaccess 代码来将某个 url/页面上的 HTTPS 请求重定向到 HTTP(没有 SSL,是的,反之亦然)。
请帮忙。
启用mod_rewrite并.htaccess通过httpd.conf(如果尚未启用),然后将此代码放入您的DOCUMENT_ROOT/.htaccess文件中:
mod_rewrite
.htaccess
httpd.conf
DOCUMENT_ROOT/.htaccess
RewriteEngine On RewriteCond %{HTTPS} on RewriteRule ^surf\.php$ http://%{HTTP_HOST}%{REQUEST_URI} [L,NC,R=301]