User Tools

Site Tools


software:webdesign:htaccess

This is an old revision of the document!


What Can it Do

There is a huge range of things .htaccess can do including: password protecting folders, redirecting users automatically, custom error pages, changing your file extensions, banning users with certian IP addresses, only allowing users with certain IP addresses, stopping directory listings and using a different file as the index file.

http://www.freewebmasterhelp.com/tutorials/htaccess/1

htaccess Cheatsheet

http://www.thejackol.com/htaccess-cheatsheet/

.htaccess is most often used to restrict or deny access to individual files and folders. A typical example would be an “includes” folder. Your site's pages can call these included scripts all they like, but you don't want users accessing these files directly, over the web. In that case you would drop an .htaccess file in the includes folder with content something like this..

  NO ENTRY!
  <code>
  # no one gets in here!
  deny from all
  </code>

order allow,deny

deny from all
Satisfy All
AddType x-mapp-php5 .php
# $Id$
#
# This is used to restrict access to this folder to anything other
# than images

# Prevents any script files from being accessed from the images folder
<FilesMatch "\.(php([0-9]|s)?|s?p?html|cgi|pl|exe)$">
   Order Deny,Allow
   Deny from all
</FilesMatch>
software/webdesign/htaccess.1305484499.txt.gz · Last modified: by superwizard