A tool to debug and test mod_rewrite (.htaccess) directives [closed]

只谈情不闲聊 提交于 2019-12-18 12:19:38

问题


Although being a decent web developer, I and most of my colleagues always struggle with basic tasks when using mod_rewrite.

I read the manuals and understood most of it, however most skills I've learned in life are by doing. The trouble is, there's no easy way to debug the configuration. Most of the time if I succeed at configuring the .htaccess file it's by sheer random luck not by trial and error.

I realize one can read Apache error logs or pass rewriteRule results to GET parameters and present them in say, PHP files, but that's inconvenient and slow.

So, the question. Is there a tool for writing and debugging .htaccess directives? Update: given that questions asking for libraries and similar are frequently closed as out of scope for SO, is there a more general technique for doing this?


回答1:


You could use our htaccess tester. It allows you to test basic rewrite rules and conditions, we are trying to improve it's functionality over time but it does the job quite well with the current feature set.




回答2:


unit testing tools won't be of much help here. look for functional testing tools.



来源:https://stackoverflow.com/questions/3417039/a-tool-to-debug-and-test-mod-rewrite-htaccess-directives

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