Nginx 'rewrite or internal redirection cycle while internally redirecting' resulting in 500

错误提示为 /var/log/nginx/error.log


Nginx 'rewrite or internal redirection cycle while internally redirecting' resulting in 500

解决办法:


在虚拟主机配置文件中加上

<span style="font-size:14px;">## Wordpress Rewrite
    if (!-e $request_filename){
            rewrite ^(.*)$ /index.php?q=$1 last;
            break;
    }
</span>


参考解决办法地址:

http://stackoverflow.com/questions/18321325/nginx-rewrite-or-internal-redirection-cycle-while-internally-redirecting-resul

rewrite or internal redirection cycle while internally redirecting to "/index.html" 是一个nginx的错误,它表示在内部重定向过程中出现了循环。 这个错误通常是由于nginx配置文件中的重写规则设置错误导致的。根据提供的配置文件段落,可以看出在location /的配置中使用了try_files指令来匹配请求的文件,如果找不到则会重定向到/oeos/index.html。但是,在/oeos/index.html页面中可能又存在重定向规则,导致了循环重定向的情况。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *2* [[nginx]nginx rewrite or internal redirection cycle while internally redirecting](https://blog.csdn.net/qubes/article/details/125655094)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *3* [解决nginx 报错提示:rewrite or internal redirection cycle while internally redirecting to “/](https://blog.csdn.net/qq_32406257/article/details/121658449)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值