liquidweb / htaccess-validator-shell
Shell script for linting and validating Apache2 Htaccess files
Installs: 49 925
Dependents: 1
Suggesters: 0
Security: 0
Stars: 17
Watchers: 11
Forks: 2
Open Issues: 1
Language:Shell
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-11-06 03:08:52 UTC
README
Apache Htaccess files can be a double-edged sword: on one hand, site owners can easily add new rewrites, configure headers, and more. On the other hand, one mistake can mean the whole site goes down.
This script aims to solve that problem, enabling changes to validated programmatically. Making changes to a site's .htaccess
file? Validate your changes before applying them!
⚠️ Using PHP?
Check out this script's companion Composer package.
Requirements
As the package uses Apache2 itself to validate, it must be available within your environment. The Liquid Web Knowledge Base has instructions for installing Apache on most popular platforms.
Usage
The bin/validate-htaccess
script accepts a configuration file for validation:
$ bin/validate-htaccess /path/to/some/file.conf
The script will return a non-zero exit code if validation errors were detected. Individual codes are documented in the script's header.