将http重定向到https排除特定IP

坎尚·萨卡(Kanchan Sarkar)

我已使用以下规则排除了200.200.0.17从http重定向到https的情况,但其请求(从200.200.0.17)仍在重定向到https。任何帮助将不胜感激。

<VirtualHost _default_:80>
# If mod_rewrite is present, it takes precedence over mod_alias
# and it is necessary to rewrite the request to https.
  <IfModule mod_rewrite.c>
     RewriteEngine on
     RewriteCond %{REMOTE_ADDR} !^200.200.0.17
     RewriteRule (.*) https://%{HTTP_HOST}$1
  </IfModule>

# Otherwise use mod_alias to redirect.
  Redirect / https://%{HTTP_HOST}/
</VirtualHost>
车坛

在执行第一个规则之后,还将执行第二个规则。为防止这种情况发生,请使用该last标志。更改代码中的行:

RewriteRule (.*) https://%{HTTP_HOST}$1 [L]

请参阅:https//httpd.apache.org/docs/2.4/rewrite/flags.htm

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

将特定主机从HTTPS重定向到HTTP

来自分类Dev

将特定文件从https重定向到http

来自分类Dev

http 重定向到特定的 https 链接

来自分类Dev

Laravel将Http重定向到Https

来自分类Dev

将 HTTP 重定向到 HTTPS

来自分类Dev

NGINX 将 http 重定向到 https

来自分类Dev

将 http:// 重定向到 https:// 的方法

来自分类Dev

将IP重定向到特定端口

来自分类Dev

如何将http重定向到https和将https:// www重定向到https://

来自分类Dev

将http重定向到https(https将http重定向到默认值)

来自分类Dev

使用htaccess将https重定向到非http并将Http重定向到Https

来自分类Dev

HTTP 到 HTTPS 重定向

来自分类Dev

将 HTTP 重定向到 HTTPS 还是拒绝使用 HTTP?

来自分类Dev

nginx将特定站点从http重定向到https不起作用

来自分类Dev

RewriteRules将特定域https重定向到http,其他则相反

来自分类Dev

使用iptables将端口443(https)重定向到IP

来自分类Dev

使用iptables将传入的https重定向到本地ip

来自分类Dev

从http到https的特定页面重定向,但有例外

来自分类Dev

NGINX将http重定向到https,将非www重定向到ww

来自分类Dev

将http重定向到https,也将no-www重定向到www

来自分类Dev

NGINX将http重定向到https,将非www重定向到ww

来自分类Dev

在opencart中使用htaccess将https重定向到http

来自分类Dev

使用Chrome扩展程序将http重定向到https

来自分类Dev

将根HTTP重定向到根HTTPS

来自分类Dev

将HTTP请求重定向到HTTPS的推荐方法

来自分类Dev

播放框架将HTTP重定向到https

来自分类Dev

Spring Boot将HTTP重定向到HTTPS

来自分类Dev

使用301或303将http重定向到https

来自分类Dev

如何将https文件重定向到http文件

Related 相关文章

热门标签

归档