htaccess
This article is a stub. You can help the IndieWeb wiki by expanding it with relevant information.
.htaccess is the file used for configuring particular sites on apache (as opposed to httpd.conf which is global).
How to
This section is a stub. You can help the IndieWeb wiki by expanding it.
How to block POST
If you need to block all POST requests, e.g. due to an underlying language handling vulnerability (e.g. PHP2Shell), you can add the following lines to your .htaccess:
RewriteEngine on
RewriteCond %{REQUEST_METHOD} POST
RewriteRule .* - [F,L]
Tantek Γelik has set this up on his sites that use PHP- Add yourself hereβ¦ (see this for more details)
See Also
- Wikipedia:.htaccess
- Apache
- LiteSpeed
- redirect
- Understanding .htaccess by Lauren Brumfield
- http://www.htaccesscheck.com/ a checker to validate that your .htaccess lines are free of any syntax errors
- https://htaccess.madewithlove.be/ to test your htaccess