nginx rewrite 重定向问题?
https://www.123.com/770422332/index.php => http://www.123.com/index.php?id=770422332
我想怎么变化该怎么写rewrite
location / {
rewrite ^/(/d+)\/index\.php$ /index.php?id=$1 last;
}
我怎么写不行~不知道错在哪里~帮忙看下谢谢~!
------解决思路----------------------
https://www.123.com/770422332/index.php
你这个是啥规则啊?
https://www.123.com/index/770422332
=>
rewrite ^/index\/(/d+)$ /index.php?id=$1 last;
------解决思路----------------------
<br /><br />rewrite "^/(/d+)/index.php$" /index.php?id=$1 last;<br /><br />
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号