页面未正确重定向-HTTPS HTACCESS重写错误 [英] The page isn't redirecting properly - HTTPS HTACCESS rewrite error

查看:109
本文介绍了页面未正确重定向-HTTPS HTACCESS重写错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下htaccess重写规则

I have this following htaccess rewrite rules

rule1导致无限循环错误.我正在尝试将所有请求重定向到HTTPS,但是它不起作用.

The rule1 is causing the infinite loop error. I am trying to redirect all the request to HTTPS but it's not working.

由于Rule1,Rule2也被阻止.当我对Rule1进行评论时,一切都很好.

Because of the rule1 the rule2 is also blocked. When I comment on rule1 everything is fine.

如果我更改顺序,也会发生无限循环错误.

If I change the order also this infinite loop error occurs.

请帮助我如何解决此错误

Please help me how to resolve this error

RewriteEngine On
RewriteBase /

#Rule 1: Rewrite all the requests to HTTPS
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]

//Rule 2: redirect to the account closed setup
RewriteRule ^(?:abcd)/A-Report/(.+)$ /closed/$1 [NC,L]

提前谢谢.

推荐答案

基于此 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆