Writing .htaccess files can be an annoying task. There’s a lot written about it, but it remains a hard topic to get right, especially if you’re only doing this infrequently. Testing those files can be hard because it requires a local Apache server running or to upload it to a live server. That’s why we wrote the htaccess tester some years ago, and our users like it; it is being used thousands of times every month.
That’s why we’ve decided – next to the regular maintenance we do – to spend some additional time to extend the product with some new features!
The CLI tool
Having a command-line equivalent to the htaccess tester was a long-time request and it is finally here! Checking how an htaccess file behaves might still be more clear in the web interface, but having this tool opens some cool new possibilities, such as testing htaccess files in your continuous integration suite. That’s why we also distribute the CLI tool using a docker container which is automatically built and pushed for every new tag.
Having a different view also helped a lot with improving the displayed (error) messages that weren’t as clear in a different context.
Since this command-line tool is mostly useful in a Continuous Integration environment, we also created a GitHub Action for it. This way you can be sure that after editing your htaccess file, it still follows the rules that are important for your codebase. It’s published in the GitHub marketplace and can thus be easily set up in your projects!
PHP API Client
Because of the CLI tool, we are now using the API in multiple codebases, so we extracted a small open-source API Client. A cool thing here is that it only relies on PSR interfaces, so you can use it with whichever HTTP client that implements these interfaces. This means that you won’t get into trouble when your project already uses, for example, an old version of Guzzle.
Improved product decisions
We had trouble deciding if some changes were sensible or not, so we decided to finally take the time to introduce event tracking. Now we have numbers to support future product decisions!
Next to always adding more Apache features, there isn’t really a clear roadmap for the htaccess tester and all the tools around it, so if you have great ideas or if you are missing something, feel free to create some issues.
If you like these tools, feel free to give them a star on GitHub and try them out in your projects if they contain .htaccess files!
Let’s start the conversation
Got questions or a great future request? Need help with using the htaccess tester? Or perhaps you’ve used the tool in the past and want to help to spread the love? You can start here.