htaccess block IPs while RewriteEngine/modrewrite is enabled solution -

htaccess block IPs while RewriteEngine/modrewrite is enabled solution

Istruggled with this for awhile because the normal setup won't work if modrewrite is being used:

ORDER ALLOW, DENY

So the solution is something like this:


order allow,deny
deny from 12.43.12.0/24
allow from all


  • Unable to configure RSA server private key SSL Library Error: 185073780 error:0B080074:x509 certificate routines:X509_check_private_key:key values mismatch
  • Error code: ssl_error_rx_record_too_long
  • Centos OpenDKIM & Postfix Setup Guidel
  • The redirect URI in the request: urn:ietf:wg:oauth:2.0:oob can only be used by a Client ID for native application. It is not allowed for the 'WEB' client type.
  • dir2slideshow Centos rpm requirements
  • bash script delete all non-English characters
  • Lost connection to MySQL server during query [2013]
  • No package fuse-encfs available. yum
  • Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
  • No response from subprocess (whostmgr (whostmgr)): The subprocess exited with status 12 (ENOMEM).
  • ResourceManager[31705]: CRIT: Resource STOP failure. Reboot required!
  • htaccess modrewrite query string to another URL howto
  • bash script how to do wildcard string comparisons or matching
  • bash script test if directory exists
  • bash script check if file exists
  • bash script linux how to do a wildcard string comparison
  • Windows 2012 Server R2 Install Error "windows cannot find the microsoft license terms windows 2012 server install"
  • cPanel how to force reinstall rpms and fix packages and other problems caused by updates or duplicate rpms
  • kvm how to add secondary cdrom drive
  • Dell CS24SC Server Info