I know apachectl
has the configtest
option, but as far as I can tell it's only for checking the entire config chain for the system apache. I would like to have a tool that can test an individual .htaccess file for errors as part of a continuous integration toolchain. Is there any way to do that with or without apachectl?
Asked
Active
Viewed 1,634 times
3
-
http://serverfault.com/questions/125081/how-can-i-perform-a-syntax-check-on-an-htaccess-file-in-a-shared-hosting-enviro is related. – kbulgrien Jan 16 '13 at 14:55
-
http://stackoverflow.com/questions/2407865/validating-htaccess-before-deployment is related. – kbulgrien Jan 16 '13 at 15:01
1 Answers
1
I came across few online tools to validate .htaccess
Syntax/Directives and few basic things htaccess-validator and code syntax checker and validator.
PS: To narrow down analyses/error and speed up validation, limit the no. of Directives while validation.

Mayura
- 111
- 4
-
1Are you suggesting I write wget or curl scripts to use these web services? Under CI testing I may end up hitting them too heavily and get banned… – kojiro Jan 15 '13 at 13:39
-
No! I'm suggesting you to upload/paste .htaccess content in respective online tools! Btw, why'd you heat them too heavily? do you need mass validation? – Mayura Jan 15 '13 at 13:40
-
-
Ah, i'm not aware of such commandline tool, which could validate it like we do by `apachectl` & `configtest`. Seems, we need Open Source Community support. :D – Mayura Jan 15 '13 at 13:44
-
-
Sadly, no, I've never found a tool that can validate an individual htaccess file under CI use cases. – kojiro May 30 '22 at 21:42