4 ms·
.htaccess tester
- MarvinYork 16y agoNice, but %{SERVER_PORT} failed.
- andreascreten 16y agoI just added it, enjoy!
- danbee 16y agoCan you add %{HTTPS} too? Edit: Also, just noticed that RewriteCond %{SERVER_PORT} 80 does not work unless you explicitly add :80 to the URL.
- ZoFreX 16y agoEmphasis on "simple", it didn't hit a single rule when I tried out a complex .htaccess file. It's a great idea and a nice start, but I really have no need for a tool to debug only my simple .htaccess files!
- andreascreten 16y agoCan you send me some of those rules to that we can implement them?
- ZoFreX 16y ago%{HTTP_HOST} isn't recognised for one, and lines like "Redirect 301 /foo http://www.example.com/ http://www.example.com/ aren't recognised at all. However, I can't really use this as a tester unless it implements everything rather than a list of directives I give you - if I don't realise an unrecognised directive lies in the middle of my .htaccess, my test results could be misleading. It's a great idea, but it might be better to implement it by hooking into the same code Apache uses, if that is at all possible.
- Joakal 16y agoThere should be a tester with nginx due to rising popularity. I would love to try it.
- morganpyne 16y agoConsidering that nginx has no concept of a .htaccess file or per-directory configuration file (they kill performance) I'm not sure what you mean here. nginx itself reports clear and easy to understand errors on it's configuration files. If you simply want to test the config (without actually starting/restarting nginx), just pass it the '-t' flag; similar to apache's 'configtest' option.
- deleted 16y ago[deleted]
- benwerd 16y agoThis is brilliant. Any chance you could make it an offline web app / native tool?
- andreascreten 16y agoThe algorithm for doing this is currently written in php which makes it unable to port it easily.
- jamesgeck0 16y agoOr post it on Github? Only further awesomeness could result.
- andreascreten 16y agoYep, we plan to do that.
- clu3 16y agoAwesome. This will save a whole lot of time for developers like me. Thank you
- andreascreten 16y agoYou're welcome :-D
- djjose 16y agoI wish I had this ages ago, great job!