我有一个网站,现在我想禁用一页的https。我已经尝试了一些htaccess代码,但似乎无法让它工作。
我的htaccess代码如下:
# BEGIN custom php.ini PHP54
<IfModule mod_suphp.c>
suPHP_ConfigPath /home3/jirayer/public_html
</IfModule>
# END custom php.ini
## Disable Framing of Website - Security Fix ##
Header always append X-Frame-Options SAMEORIGIN
## Disable Framing of Website - Security Fix ##
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.fipe.net/$1 [R,L]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
## Disable Folder Browsing ##
Options -Indexes
## Disable Folder Browsing ##
Options +FollowSymlinks
RewriteEngine on
rewriterule ^index.html(.*)$ https://www.fipe.net/$1 [r=301,nc]
ErrorDocument 404 https://www.fipe.net
我想从https
跳过whatmyip.html页面答案 0 :(得分:0)
使用以下条件&#34; RewriteCond%{SERVER_PORT} 80&#34; line:
RewriteCond %{REQUEST_URI} !^/whatmyip.html
它从RewriteRule中删除了/whatmyip.html网址。
答案 1 :(得分:0)
在你的htaccess中添加这些行。这解决了问题
RewriteCond %{SERVER_PORT} 443
RewriteRule ^/whatmyip.html(.*)$ http://www.<your domain>.com/whatmyip.html$1 [R,L]