background preloader

Htaccess

Facebook Twitter

403 Forbidden. Behind the Scenes with Apache’s .htaccess Although I’m a designer and not a programmer or server-side specialist, for a few years I’ve used Apache’s .htaccess to a limited degree for clients' websites, primarily for simple URL redirects and setting up custom error pages.

403 Forbidden

Now that I can use Apache’s .htaccess for my own websites, I’ve been immersed in learning more about how to use this powerful tool conservatively but effectively to redirect URLs and to combat spammers and bad bots. Today’s post provides links to some of the online sources that I’ve found especially helpful. First, A Word of Warning Keep in mind that one little typo or incorrect rule within an .htaccess file can cause an internal server error and take your entire website offline.

In addition, many caution those new to .htaccess about not getting too carried away and ending up creating excessively big .htaccess files. Regarding combating bad bots and spammers, .htaccess is one of several tools and approaches that I use. .htaccess Tutorial. Introduction In this tutorial you will find out about the .htaccess file and the power it has to improve your website.

.htaccess Tutorial

Although .htaccess is only a file, it can change settings on the servers and allow you to do many different things, the most popular being able to have your own custom 404 error pages. .htaccess isn't difficult to use and is really just made up of a few simple instructions in a text file. Will My Host Support It? This is probably the hardest question to give a simple answer to. Many hosts support .htaccess but don't actually publicise it and many other hosts have the capability but do not allow their users to have a .htaccess file. A good sign of whether your host allows .htaccess files is if they support password protection of folders. What Can I Do? You may be wondering what .htaccess can do, or you may have read about some of its uses but don't realise how many things you can actually do with it. Tutorial: .htaccess files. .htaccess files provide a way to make configuration changes on a per-directory basis. .htaccess files You should avoid using .htaccess files completely if you have access to httpd main server config file.

Tutorial: .htaccess files

Using .htaccess files slows down your Apache http server. Any directive that you can include in a .htaccess file is better set in a Directory block, as it will have the same effect with better performance. What they are/How to use them .htaccess files (or "distributed configuration files") provide a way to make configuration changes on a per-directory basis. Note: If you want to call your .htaccess file something else, you can change the name of the file using the AccessFileName directive. AccessFileName ".config" In general, .htaccess files use the same syntax as the main configuration files. For example, if you look at the documentation for the AddDefaultCharset directive, you will find that it is permitted in .htaccess files. Comprehensive guide to .htaccess- intro.

Tutorial written and contributed by Feyd, moderator of the JK Forum, with additions by JavaScriptKit.com.

Comprehensive guide to .htaccess- intro

Please see tutorial footnote for additional/bio info on author. Last updated: Jan 18th, 06' for additional section. I am sure that most of you have heard of htaccess, if just vaguely, and that you may think you have a fair idea of what can be done with an htaccess file. You are more than likely mistaken about that, however. Regardless, even if you have never heard of htaccess and what it can do for you, the intention of this tutorial is to get you two moving along nicely together.

If you have heard of htaccess, chances are that it has been in relation to implementing custom error pages or password protected directories. An htaccess file is a simple ASCII file, such as you would create through a text editor like NotePad or SimpleText. .htaccess is the file extension. Now, onto the tasty morsels...