htaccess block IPs while RewriteEngine/modrewrite is enabled solution -

htaccess block IPs while RewriteEngine/modrewrite is enabled solution

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



So the solution is something like this:

order allow,deny
deny from
allow from all

  • initial Main Mode message received on but no connection has been authorized with policy=PSK
  • Firefox errors Unable to generate public/private key pair. (Error code: sec_error_keygen_fail)
  • Centos/obfsproxy errors
  • rsync backup entire system properly
  • OpenVZ Install Guide Again / Quick Setup
  • flypro EEPROM PLCC32 programmer software error "The device ID does not match, whether to continue operating"
  • grub cannot install or boot from mdadm RAID 10 array
  • mdadm create raid10 array with only 2 drives
  • Openvz Enable netadmin
  • Centos yum mirror problem error "[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found""
  • ssh session and port forward or reverse port matching or assocation howto
  • yum how to blacklist and exclude mirrors
  • ECC Errors in action
  • Avocent Unable to load resource avctVideo.jar
  • iptables port forwarding multiple ports to another IP
  • Dell CS24 NV5/NV7 Gigabyte GA-3CESL-RH Motherboard ROM Chip info
  • phlash Cannot flash when memory managers ( e.g. HIMEM) are present Phoenix BIOS
  • Weird Ubuntu Issues with NVIDIA driver/Compiz
  • HP Switch 2824 CLI Telnet Experience , Guide and Tutorial
  • rm how to delete a file with -- 2 leading dashes