Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一种情况,我试图将所有对 site.com/news 的访问重定向到 site.com/dir/news。无论我做什么,如果不匹配 site.com/dir/news,我似乎都无法匹配 site.com/news,这会导致无限重定向循环,直到浏览器超时。
这是我当前的代码。有人看到我在这里缺少什么吗?
RewriteRule ^(.*)news $1dir/news [R=301,L]
非常感谢!
RewriteRule ^news(.*) dir/news$1 [R=301,L,QSA,NC]