Htaccess FAQ

I have made a .htaccess FAQ with anser to the most frequently asked questions about .htaccess and mod_rewrite. I will continously update the FAQ with more questions and answers. Please create a thread in the forum or contact me if you have a question not listed in the FAQ.

How do I make a .htaccess file on Windows?

Windows will not let you rename a file to “.htaccess”. You will get an error “You must type a filename” if you try. Instead you can open the file you want to rename in a text editor, ie Notepad. Choose “Save as..” and select “All types (*.*)” next to file type. Now type the filename “.htaccess” and click save.

Where can I learn about mod_rewrite?

You can read about the Apache module mod_rewrite on Apache’s URL Rewriting Guide and the mod_rewrite reference documention.

Where can I learn about Regular Expressions?

You can learn about (Extended) Regular Expressions that the Apache module mod_rewrite uses on http://en.wikipedia.org/wiki/Regular_expression.

I cant see .htaccess files in my FTP program. What can I do?

Some FTP programs dont show dot files, files or directories that starts with a “.”, by default.

Below is instructions on how to show dot files in popular FTP programs. I have not followed these instructions myself, so I cant comment on them. Thanks to John S. for the list.

Please note that some FTP servers are not configured to show dot files. If this is the problem in your case you have to contact your host.

FileZilla

  1. View -> Show hidden files.

Cute FTP

  1. Open the Site Manager (press F4) and click on the name of the relevant site.
  2. Click the Actions tab, then click Filter.
  3. Select the Enable Filtering check box.
  4. In Server side filtering, select the Enable Server Side Filtering check box.
  5. In the Remote Filter box, type -a.
  6. Click OK, then click Connect.

WS_FTP Pro (7.62)

  1. Sites
  2. Organize sites
  3. Site options
  4. Startup tab
  5. In Remote Filter Mask box enter -a