• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
The Electric Toolbox Blog

The Electric Toolbox Blog

Linux, Apache, Nginx, MySQL, Javascript and PHP articles

  • Applications
  • FCKEditor
  • Apache
  • Windows
  • Contact Us
Home / Apache .htaccess recipes, tips and tricks

Apache .htaccess recipes, tips and tricks

This is a summary post containing a list of the articles from this blog containing recipes, tips and tricks for using Apache’s .htaccess files.

Password protection

  • password protecting a directory
  • password protection, but allowing access from a specific IP address
  • remove password protection from a subdirectory or file

IP address restriction

  • allowing and denying access by IP address

PHP

  • disable PHP in a directory
  • disable PHP short tags
  • parse .html files as PHP
  • set PHP configuration options

Posts using mod_rewrite

  • aliasing images to a remote server

Other stuff

  • setting 503 “Service Temporarily Unavailable” headers
  • using mod_expires to control browser caching
  • compressing files with mod_deflate

Changing the .htaccess filename to something else

It’s possible to change the filename used for htaccess files to something else, although you will need access to the server configuration to be able to set this in either the main config or on a virtualhost by virtualhost basis. It can be useful for having a different .htaccess file for your local development box. Read the post changing the .htaccess filename in Apache for more details.

Offsite articles with more htaccess tips and tricks

I’ve only got one at the moment, but if I find any other useful ones I’ll add them here.

  • 17 useful htaccess tricks and tips at queness.com

Check Out These Related posts:

  1. jQuery: show plain text in a password field and then make it a regular password field on focus
  2. Password protect a directory with Apache
  3. Remove directory Linux
  4. ExpressVPN vs. IPVanish – Which is Better?

Filed Under: Apache

Primary Sidebar

Categories

  • Apache
  • Applications
  • Article
  • Case Studies
  • Email Servers
  • FCKEditor
  • HTML And CSS
  • Javascript
  • Linux/Unix/BSD
  • Microsoft SQL Server
  • Miscellaneous Postings
  • MySql
  • Networking
  • Nginx Web Server
  • Offsite Articles
  • OSX
  • PHP
  • Quick Tips
  • RFC – Request for Comments
  • SilverStripe
  • VMWare
  • VPN
  • Windows
  • WordPress

Recent Posts

  • Vim Show Line Numbers
  • Add User To Group Linux
  • Chmod 777 Tutorial
  • How to Copy Directory Linux
  • Linux create user

Copyright © 2021. ElectricToolBox. All Rights Reserved.

  • Contact Us
  • Copyright Info
  • Privacy Policy
  • Sitemap