.htaccess generator
htaccess_generatorBuilds a commented .htaccess file for Apache and LiteSpeed: force HTTPS, www or non-www, 301 redirects, error pages, security headers, caching, compression and IP blocks. Returns the file text and findings.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "htaccess_generator"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| www | No | Redirect to the www or the non-www host. Defaults to none. | |
| hsts | No | Send the Strict-Transport-Security header. | |
| https | No | Redirect HTTP to HTTPS. | |
| domain | No | The domain the record is for, such as example.com. Optional. | |
| caching | No | Add browser caching rules. | |
| nosniff | No | Send X-Content-Type-Options: nosniff. | |
| block_ips | No | IPv4 or IPv6 addresses or CIDR ranges to block. | |
| error_403 | No | Path of the 403 page, such as /403.html. | |
| error_404 | No | Path of the 404 page, such as /404.html. | |
| error_500 | No | Path of the 500 page, such as /500.html. | |
| redirects | No | 301 redirects from an old path to a new path or URL. | |
| no_indexes | No | Turn off directory listings. | |
| compression | No | Compress text responses. | |
| protect_files | No | Block access to sensitive files such as .env and .git. | |
| hsts_subdomains | No | Add includeSubDomains to HSTS. | |
| referrer_policy | No | Send a Referrer-Policy header. | |
| frame_protection | No | Send X-Frame-Options. | |
| hotlink_protection | No | Block other sites from embedding images. Needs domain. | |
| permissions_policy | No | Send a Permissions-Policy header. | |
| redirects_are_regex | No | Treat the from values as regular expressions. |