Is there a simple, simple, and lazy way to test the rules against Apache mod_rewrite?

I want to test the effects of mine RewriteRulewithout experiencing problems with configuring vhost RewriteLogand throwing URLs in the browser (or curlthem).

But I do not just want to check for regular expressions. I want my URLs to actually go through the Apache mod_rewrite stack, and I want to see the answer that comes out of it.

Surprisingly, if I could get some traces, which rules acted on the URL, in what order and what were the intermediate results. (I think most of this appears in the rewrite log, but I wanted to avoid this setting)

Is there any tool for this?

I am sure that it cannot handle RewriteConds, since they usually rely on request headers and something else.

+5
source share
3 answers

I did not come across a mod_rewrite validator, but setting up vhost could be faster than posting here :)

Your best bet is unit testing. Provide rewriting rules and a list of expected results, then receive a regular report. I don’t know your environment, but Google’s results look promising.

Hope you are pointing in the right direction!

+2
source

Here is the htaccess online tester:

http://htaccess.madewithlove.be/

(according to fooobar.com/questions/393243 / ... )

0
source

fooobar.com/questions/342703/... ...

http://www.generateit.net/mod-rewrite/index.php allows you to create a RewriteRule, and also allows you to change the resulting URL to suit your needs.

0
source

All Articles