1

First off, there is a plethora of great material on .htaccess on SO. However, some of it is advanced and it mostly spread across multiple questions. Today I found a tutorial with a number of good tips, which will be in an answer.

Community wiki.

casualcoder
  • 380
  • 1
  • 4
  • 13

3 Answers3

1

The tutorial at JavaScriptKit covers the following topics each with a brief example:

  • Error Documents
  • Password protection
  • Enabling SSI via htaccess
  • Blocking users by IP
  • Blocking users/ sites by referrer
  • Blocking bad bots and site rippers (aka offline browsers)
  • Change your default directory page
  • Redirects
  • Prevent viewing of htaccess
  • Adding MIME types
  • Preventing hot linking of your images and other file types
  • Preventing directory listing
casualcoder
  • 380
  • 1
  • 4
  • 13
0

An advanced tutorial on mod_rewrite, a commonly used feature of .htaccess files:

casualcoder
  • 380
  • 1
  • 4
  • 13
0

Some different methods for preventing hotlinking with mod_rewrite:

casualcoder
  • 380
  • 1
  • 4
  • 13