I want to test the effects of my RewriteRule
s without going through all the trouble of setting up a vhost and a RewriteLog
and throwing URLs at the browser (or curl
ing them).
But I don't just wanna test regular expressions. I want my URLs to actually go through Apache's mod_rewrite stack, and I want to see the response that would come out of it.
Awesome if I could get some trace of which rules acted on the URL, with which order, and what the interim results were. (I guess most of this appears in the rewrite log, but I wanted to avoid that setup)
Is there any tool for this out there?
I'm ok with it not being able to handle RewriteConds, since those generally rely on the request headers and whatnot.
I haven't come across a mod_rewrite validator, but setting up a vhost may have been quicker than posting here :)
Your best bet is unit testing. Provide rewrite rules and a list of expected results then get a regular report. I don't know your environment but Google results look promising.
Hope that points you in the right direction!
Here is an online htaccess tester:
http://htaccess.madewithlove.be/
(as per https://stackoverflow.com/a/5907896/190791)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With