| Home | Articles | Archive | Links |


- Misc
What A htaccess File Is And How...
The Latest On WordPress Themes
To Blog Or Not To Blog The Ups...
Trackback Spam Explained
Web 2 0 A Guide For Newbies
Ah The Joys Of Online Coupons
Web Marketing Its All About...
Why Online Coupons Are The Rage
Benefits Of Webmaster Toolkit...
What You Should Know About Trackback...
What You Newbies Need To Know About...
The Exciting World Of Video Blogging...
com Not Listed In Regional Yahoo...
Cybersmear And The Job Seeking...
Phishing On The Pharm How Thieves...
1stepsystem A One Step Internet...
3 Ideas That Made Internet...
3 Key Ingredients For Your Profit...
3 Legitimate Reasons For Getting An...
3 Must Read Books For Bloggers
3 Tips For Building Traffic To Your...
4 Common Mistakes New Affiliate...
4 Things Web Analytics Can Teach You...
4 Tips To Increase Your Blog...
4 Ways To Get Traffic To Your...
- SEO
Taguchi Method The Key In Ad...
1 Million In Google Adsense...
3 Steps To Getting Listed...
4 Key Ways To Keep Visitors Coming...
4 Steps To Law Firm Website Search...
4 Tips For Raising Your Search...
4 Tips To Build A Content Site With...
- Earning Money
Learning How To Bike The Right Way
Internet Business Myths The True...
2 Surefire Ways To Maximize Your...
3 Reasons Why Blogging Will Boost...
3 Simple Tips For Making Money...
- Hosting
3 Options For Hosting Multiple...
4 Tips To Find The Web Host That s...
- Linking
3 Way Links
Spoofing Phishing And Link Altering...

What A htaccess File Is And How To Make One



A


.htaccess file is a            done by clicking the file and     
simple ASCII file similar       renaming it by removing anything  
to that created through         that doesn’t say .htaccess. It    
text editor such as Notepad or        can also be renamed via telnet or 
Simple Text. Most people are          the ftp program.                  
confused with the naming                                                
convention for the file. The term     These files must not be uploaded  
.htaccess is not a file .htaccess     as binary but rather as ASCII     
or somepage.htaccess because it       mode. Users can CHMOP the         
is the file extension simply          .htaccess file to 644 to make the 
named as such. Its widely known       file usable by the server while   
use is related to implementing        preventing it from being read by  
custom error page or password         a browser since this can          
protected directories.                seriously compromise security.    
                                      When there are passwords          
Creating the File                     protected directories and a       
                                      browser can read the .htaccess    
The creation of the file is done      file, the location of the         
by opening up a text editor and       authentication file can be        
saving an empty page as               acquired to reverse engineer the  
.htaccess. If it is not allowed       list and thereby completely       
to save an empty page, simply         access any portion that had       
type in one character. An editor      previously been protected. This   
probably appends its default file     can be prevented by either        
extension to the name. Notepad        placing all authentication files  
for one would call the file           above root directory thereby      
.htaccess.txt but the .txt or         rendering the www inaccessible or 
other file extension need to be       through an .htaccess series of    
removed to enable the user to         commands that prevents itself     
start “htaccessing”. This can be      from being accessed by a browser. 



                                      .htaccess located in the root, if 
Most commands in .htaccess are        considered the nearest, affects   
meant to be placed on one line        every single directory in the     
only thus if a text editor uses       entire site.                      
word wrap, it should be disabled                                        
as it is possible that it might       Placement of .htaccess should not 
throw in a few characters that        be done indiscriminately as this  
might contradict Apache.              may result to redundancy and may  
.htaccess is not for NT servers       cause an infinite loop of         
and is considered an Apache           redirects or errors. There are    
thing. Apache is generally very       sites that do not allow the use   
tolerant of malformed content in      of .htaccess files because a      
an .htaccess file.                    server overloaded with domains    
                                      can be slowed down when all are   
The directory in which .htaccess      using .htaccess files. It is      
file is placed is “affected” as       possible that .htaccess can       
well as all sub-directories. It a     compromise a server configuration 
user wishes not to have certain       specifically set-up by the        
.htaccess commands affect a           administrator. It is therefore    
specific directory, this is done      necessary to make sure that the   
by placing a new .htaccess file       use of .htaccess is allowed       
within the directory that should      before its actual use.            
not be affected with certain                                            
changes and removing the specific     Error documents are only a part   
command/s. from the new .htaccess     of the general use of .htaccess.  
file which should not affect the      Specifying one’s own customized   
directory. The nearest .htaccess      error documents will require a    
file to the current directory is      command within the .htaccess      
the one considered as the             file. The pages can be named      
.htaccess file. A global              anything and can be placed        



anywhere within the site as long      password protecting folders and   
as they are web-accessible            automatic redirection of users,   
through a URL. The best names are     .htaccess is also capable of      
those that would prevent the user     changing file extension, banning  
from forgetting what the page is      users with extra certain IP       
being used for.                       address allowing only users with  
                                      certain IP addresses, stopping    
Password protection is                directory listing and using a     
effectively dealt with by             different file as the index file. 
.htaccess. By creating a file         Accessing a site that has been    
called .htpasswd, username and        protected by .htaccess will       
the encrypted password of the         require a browser to pop-up a     
people to be allowed access are       standard username/password        
placed in the .htpasswd file. The     display box. However, there are   
.htpasswd file should likewise be     certain scripts available which   
not uploaded to a directory that      will allow the user to embed a    
is web accessible for maximum         username/password box in a        
security.                             website to do the authentication. 
                                      The wide variety of uses of       
Whole directories of a site can       .htaccess facilitates time saving 
be redirected using the .htaccess     options and increased security in 
file without the need to specify      a website.                        
each file. Thus any request made                                        
for an old site will be               Many hosts support .htaccess but  
redirected to the new site, with      do not publicize it while many    
the extra information in the URL      others have the capability for it 
added on. This is a very powerful     but do not allow their users to   
feature when used correctly.          have an .htaccess file.           
                                      Generally, a server that runs     
Aside from custom error pages,        UNIX or any version of the Apache 



web server will support .htaccess     configuration can be effectively  
although the host may not allow       made in a Directory Section in    
its use.                              the main server configuration     
                                      file.                             
When to Use .htaccess Files                                             
                                      Two main factors warrant avoiding 
The .htaccess files should not be     the use of .htaccess files –      
used when there is no access to       performance and security.         
the main server configuration         Permitting .htaccess files causes 
file. Contrary to common belief,      a performance hit whether or not  
user authentication is not always     it is actually used, since Apache 
done in .htaccess files. The          will look in every directory for  
preferred way is to put user          such file. The .htaccess file is  
authentication configuration in       also looked into every time a     
the main server configuration.        document is requested. The Apache 
                                      search will include .htaccess     
It should be used in situations       files in all higher-level         
where the content provider needs      directories to have a full        
to make configuration changes to      complement of directories of      
the server on a per-directory         application. As such, each file   
basis but does not have root          accessed out of the directory     
access on the server system.          results to 4 additional file      
Individual users can be permitted     system accesses even if none was  
to make these changes in              originally present.               
.htaccess files for themselves if                                       
the server administrator is           The use of .htaccess permits      
unwilling to make frequent            users to modify server            
configuration. As a general rule,     configuration which may produce   
the use of .htaccess should be        uncontrolled changes. This        
avoided when possible since           privilege should be carefully     



considered before it is given to      by setting the Allow Overide      
users. The use of the .htaccess       directive to none.                
files can be completely disabled      

                              




About the Author:

http://www.theinternetone.net


Read more articles by: Danny Wirken

Article Source: www.iSnare.com


...Archive >>

Submit Your Site
Recent Articles
  • Online MLM Secrets - Here's How to Explode Your MLM Online!

    Get online with your business and your MLM will explode The absolute worst part of any MLM business is the rejection Don't you just hate it...

  • Welcome Some Popular Webkinz Stuff Animals, Online Animals and Kingdom

    A popular children’s website today is for Webkinz toys, at: http://wwwwebkinzcom...

  • Is it Possible to Make Internet Money?

    When a few months ago I was looking for a small sideline, an income through the Internet seemed not only a quick but also an easy solution If you may believe the Internet guru’s you are in the shortest times a millionaire I was crazy enough to believe them and I bought some of their products that promised at least a few thousand dollars per month...

  • Texas Web Designers Emphasize the Importance of Effective SEO Content

    When writing content for a website, there are several factors to keep in mind The most important consideration is to optimize your content for web searches, a process otherwise known as SEO, or search engine optimization The good news is the Texas web designers have the experience and know how to provide you with optimized content across all pages of your site to insure you will have the highest possible rankings in search engine results...

  • The Importance of Link Baiting by the Texas Web Designers

    Link baiting is an effective method of link building, and is a technique that can be used by the Texas web designers to help drive traffic to your site and increase your rankings This technique, traditionally embraced by bloggers, is now being employed by web designers, and is a very effective way to build quality links Link baiting is, in essence, a way of link building, but with a twist...

    Copyright (c) 2008 Isnare.com. All rights reserved.

  • Google
    What A htaccess File Is And How To Make One