Last Wednesday we were struggling with some complex rewrite rules. To test them we had to set up a local server and keep hitting that refresh button after each change. The only thing we could see is if the URL was rewritten to the right location or not, but there was no way to actually see what’s happening. So we went on a hunt for a htaccess tester, something like Rubular which we use for regular expressions.

To our surprise there was no simple app to test rewrite rules, so we decided to dedicate our Wednesday afternoon to build one, here is the result:

It’s very easy to use, just fill in your htaccess and the url (starting with http://) you want to test and hit the “Check now” button.

By doing that your url will be rewritten according to your rewrite rules, the output view gives the new url and some debugging information you can use to improve your rules.

There are a couple of things which are not supported yet (like ${HTTP_REFERER} and %{REQUEST_FILENAME}) but we hope to add them in the future. Adding the ${HTTP_REFERER} will be quite easy but we need to find a good way to implement things like %{REQUEST_FILENAME}, please comment if you have suggestions on how we should do it.

That’s it! I hope you like it. Feel free to get in touch with us if any problems arise or if you have ideas on how we can improve it.

Update: We updated the checker to also support the HTTP_REFERER, HTTPS and SERVER_PORT variables, read more about the update in this blog post.

More about our Htaccess tester tool