我有这个重写规则设立的的.htaccess ,这是所有工作的罚款...
I had this rewrite rule set up in .htaccess and it was all working fine...
Options +FollowSymLinks +ExecCGI RewriteEngine On RewriteCond %{REQUEST_URI} ^/mypage(.*)$ [NC] RewriteRule ^(.*) example/PHProxy/poxy-0.5b2/index.php?url=example/mypage [L,R=302,NC]
然而,当我更改URL的重写规则来 example/PHProxy/poxy-0.5b2/index.php?url=example/mypage它仍然重定向到旧的URL。
However, when I change the url in the RewriteRule to example/PHProxy/poxy-0.5b2/index.php?url=example/mypage it still redirects to the old URL.
经过一番研究,我添加了一个语法错误到.htaccess文件,查看正在使用.htaccess文件(实际上是 - 因为它导致了内部服务器错误,当你试图从该目录加载一个页面)。
After some research, I added a syntax error into the .htaccess file to check the .htaccess file was being used (and indeed it was - as it resulted in an Internal Server Error when you tried to load a page from that directory).
似乎有一些缓冲的地方,但我不知道。任何想法,为什么我的变化不被拾起/如何排查并解决?
There seems to be some caching somewhere, but I'm not sure. Any ideas why my change is not being picked up / how to troubleshoot and resolve?
推荐答案问题解决了。只是注意到,有一个我的空间子目录中仍包含旧重写规则,所以这是正在执行的之一。
Problem solved. Just noticed that there is a mypage subdirectory which still contained the old rewrite rule, so that was the one being executed.
更多推荐
更改在.htaccess重写规则不生效
发布评论