Authorization & Authentication With .htaccess, you can create a specific directory that is only available to select people. Since .htaccess is a server side option, it is much more secure than JavaScript. There are more secure methods than this, but
.htaccess will work for most everyday applications.
You’ll create a file called .htpasswd, and it will contain your username and password. The password will be encrypted. Be sure that the directory to which you upload the file is not web accessible, because then, you’re defeating the purpose of having security measures. Make sure, too, that you upload the file as ASCII – not binary.
Blocking .htaccess is a great tool for
blocking bots and site rippers that will crash your server. Some
spiders are in it just for themselves, harvesting emails from your sites and selling them to other parties. Site rippers will download all of your pages for viewing offline. Each of these developments will use up your bandwidth and resources, and even crash the server. These robots typically can ignore your robots. txt, but .htaccess will help. Mostly, you need a list of bad bots. There are websites that list these bots, so that you can arm yourself against them.
You also have the power to block IP addresses through .htaccess. This is invaluable to the person who is being stalked, or just want to keep a line of defense against someone. With
Your .htaccess files are basically plain-text files that store directives to your server. These directives will all go in an Apache config file, and apply to the folder with .htaccess and all of the folders inside of it. Being able to build a server tree of directives means you can determine that each subfolder inherits the parent folder’s DNA. Yet, at the same time, you can enter any folder and make changes, such as
022
your .htaccess file, you can enter code that denies access to an IP address or an entire IP block.
Directory Listing The .htaccess will allow you to create a default directory page. When a directory request comes in that doesn’t specify one particular page, you can designate which one you want to be your default page. You can also redirect to your default page, if you have files that you don’t want people to see.
SSI
While you may wish to use SSI, make sure it’s ok with your web host before you make changes with .htaccess. Your web host may think you’re hacking their site, or committing another violation of the TOS. So,
check with your host to make sure it’s ok to use .htaccess for SSI. Once you enter your coding for SSI, you can add an extra code to automatically parse every page for SSI commands. This puts a big strain on your server. While it slows down the server, the speed will probably be barely noticeable, the web host may care a lot. .htaccess will help keep SSI hacks out of the server, but it works on each page before it displays it.
MIME Types With .htaccess, you can add MIME Types to your share of the server. This is especially useful if your server doesn’t handle particular file types correctly. This often happens with MP3 and SWF. You use AddType to specify the MIME you’re adding, followed by the application.
enabling and disabling indexes. You can deny indexing all across the site, but allow indexing in some subdirectories. Keep in mind, that as your server checks and double checks all of these directories and subdirectories, following your sometimes unpredictable labeling system, it will be slowed down. Be prepared for delays if you tend to fiddle with stuff
and get more complicated than necessary. P!
Page 1 |
Page 2 |
Page 3 |
Page 4 |
Page 5 |
Page 6 |
Page 7 |
Page 8 |
Page 9 |
Page 10 |
Page 11 |
Page 12 |
Page 13 |
Page 14 |
Page 15 |
Page 16 |
Page 17 |
Page 18 |
Page 19 |
Page 20 |
Page 21 |
Page 22 |
Page 23 |
Page 24 |
Page 25 |
Page 26 |
Page 27 |
Page 28 |
Page 29 |
Page 30 |
Page 31 |
Page 32 |
Page 33 |
Page 34