Changes to RewriteRule in .htaccess not taking effect

廉价感情. 提交于 2020-01-06 07:01:02

问题


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 ^(.*) http://example.com/PHProxy/poxy-0.5b2/index.php?url=http://example.org/mypage [L,R=302,NC]

However, when I change the url in the RewriteRule to http://example.com/PHProxy/poxy-0.5b2/index.php?url=http://example.org/mypage it still redirects to the old URL.

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?


回答1:


Problem solved. Just noticed that there is a mypage subdirectory which still contained the old rewrite rule, so that was the one being executed.



来源:https://stackoverflow.com/questions/26970186/changes-to-rewriterule-in-htaccess-not-taking-effect

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!