The other night I was making some .htaccess tweaks on a site for one of my clients. I was using my families blog to “test” the hacks. My poor wife has to put-up with these kind of things at night, while she’s trying to post. This isn’t always a safe thing to do from a marriage point of view.
None the less, I was testing my little heart out:
- Tweak, refresh.
- Tweak, refresh.
- Tweak, refresh, CRASH, undo, refresh.
- Repeat.
I came across a post this morning, by Andreas Creten, one of the founders of madewithlove:
Last wednesday we where struggling with some complex rewrite rules. To test them we had to setup 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: htaccess.madewithlove.be.
Very cool.
This reminded me of the latest episode of the “The 8BIT Podcast“. Andrew Mason interviewed David Heinemeier Hansson on running a successful busines and talked about business philosophy, 37Signals, and his book ReWork. During the interview, Heinemeier says they were tired of the crappy tools, so they decided to build their own.
There’s some wisdom there, for sure!
So, if you’re looking at making some .htaccess tweaks, here are a few places to check out:
- htaccess.madewithlove.be
http://martinmelin.se/rewrite-rule-tester/*- Comment if you use something, else!
* Unfortunately tester seems to be out of commission. If you find another, do let us know.
Happy hacking!
Rocio Miro says
Thanks for your post. I have being testing with both tools, also recommended in other sites, but they deliver different results for the same conditions. Do you know any other tool?
Eric Dye says
Sadly, I do not. :-/
Rocio Miro says
Thanks anyway, for testing “normal” stuff are still very cool tools! 🙂
Harm Frielink says
You may try:
http://www.htaccesscheck.com htaccess
Shrinivas Shukla says
http://www.generateit.net/mod-rewrite/index.php
This one is also good.
It does not test the rules but create them for us.
Keith Harris says
Hi
Having worked with htaccess files for some time, the best online checker I have found is:
http://www.htaccesscheck.com/
Rgds!
Steve C says
Quite liked this but found it confusing to begin with. Some more info/examples would be good. (I don’t do web stuff for a living only to maintain our company site, so this stuff isn’t first-nature for me.)
Ideally, there’d be a single, go-to site for all of this htaccess stuff – validation, creation and optimization.
Vivek Moyal says
Thank you for the urls for testing the htaccess
Deepak says
Why htaccess is taking time to reflect?
I am trying to redirect parent page url to url1 and child page url to url2. But, parent page works fine while child page isn’t. Any idea about how to fix that?
Todd Murphy says
I’ve tried to use the htacesss tool, but it shows multiple errors (such as “This redirect was not followed.”).
When I check a specific redirected URL, it shows up fine. The redirect works, even though the tester says it wasn’t followed.
In fact, the entire htaccess file is tagged with errors, but when I test them manually (in incognito mode for chrome) or ‘private window’ in firefox), the ‘broken’ rewrite works just fine (like redirect http to https or non-www to www).
Are my entries in the htaccess file really not functioning, or is it an issue with the tester?
Another site (http://www.htaccesscheck.com/) says that the syntax is fine.
I’m new to htaccess files, so I’m not sure what to think.
Also because I’m not so experienced, there are two fields that I find confusing: 1)the “request URL” and 2) the “HTTP_referrer.” I’m not sure what the difference is.
Todd Murphy says
This seems to be a bad link:
http://martinmelin.se/rewrite-rule-tester/
Daniel Nielsen says
It seems like this tool does not work anymore. Do you know of an alternative?
Andreas Creten says
Our htaccess tester is ten years old this year. We wrote a little post to reflect on how it started and where we are today: https://madewithlove.com/blog/this-is-madewithlove/ten-years-of-testing-htaccess-rewrite-rules/