|
Answer
by: Andrew Hickl, Aplus.Net Knowledge Base Support
Here’s
how to create a text file suitable for an .htaccess file:
- Open
up a text editor on your computer. We recommend that you use Notepad
(Windows), SimpleText (Macintosh), or Emacs (Linux / UNIX).
- Save
the file (in an easy-to-find location) as .htaccess (including
the initial dot).
- Now,
make sure that your text editor did not append a .txt suffix to the
file name.
(In
Windows, you can do this by right-clicking the icon for the text file
and selecting Properties.)
If the file name does have a .txt suffix (i.e. '.htaccess.txt'), remove
the suffix by renaming the file.
- Before
entering code into your new file, make sure that Word Wrap is turned
off. (In
Notepad, select Format…
from the top navigation bar and make sure that Word Wrap is
unchecked. This
is important because most .htaccess commands need to be placed on one line only.
- You
can now enter your code into the file.
- Upload
the .htaccess file into your web space in ASCII mode. The
.htaccess file will affect the folder that it is uploaded to and all
its subfolders.
You
may check the following web address for a comprehensive guide on the
functionality of the .htaccess files:
Important:
If you have a Windows-based hosting plan, you cannot use .htaccess
files.
Related link:
|