Dino Geek, try to help you

How to block HTTP GET and POST requests with .htaccess?


You can block HTTP GET and POST requests with .htaccess file by using `` directive. Here’s an example:

```

Order Deny,Allow
Deny from all

```
This code will block GET and POST requests from everyone. If you wish to allow from certain IP’s, you can use `Allow from` directive.

For example:
```

Order Deny,Allow
Deny from all
Allow from 192.168.1.1

```
In this case, requests from IP 192.168.1.1 will be allowed. Replace this IP address with the one you want to allow requests from.

Limitations:
The `` directive along with `Order`, `Deny` and `Allow` directives are a part of an Apache Module named mod_authz_host, which was a part of core in Apache 1.3 and 2.2. If you are using a newer version (2.3 or later) then the module has been removed, and a new module named mod_authz_core took its place. In that case, use `Require` directive instead.

For example:
```

Require ip 192.168.1.0/16

```

This will block all ip addresses from accessing your site via GET and POST method except the ones in the 192.168.1.0/16 subnet. Adjust it to meet your needs.


Simply generate articles to optimize your SEO
Simply generate articles to optimize your SEO





DinoGeek offers simple articles on complex technologies

Would you like to be quoted in this article? It's very simple, contact us at dino@eiki.fr

CSS | NodeJS | DNS | DMARC | MAPI | NNTP | htaccess | PHP | HTTPS | Drupal | WEB3 | LLM | Wordpress | TLD | Domain name | IMAP | TCP | NFT | MariaDB | FTP | Zigbee | NMAP | SNMP | SEO | E-Mail | LXC | HTTP | MangoDB | SFTP | RAG | SSH | HTML | ChatGPT API | OSPF | JavaScript | Docker | OpenVZ | ChatGPT | VPS | ZIMBRA | SPF | UDP | Joomla | IPV6 | BGP | Django | Reactjs | DKIM | VMWare | RSYNC | Python | TFTP | Webdav | FAAS | Apache | IPV4 | LDAP | POP3 | SMTP

| Whispers of love (API) | Déclaration d'Amour |






Legal Notice / General Conditions of Use