.htaccess tutorial, .htaccess file, how to create htaccess file, custom error pages, .htaccess password protect, url redirection, .htaccess redirect
Home | Services | Marketing | Outsourcing | SEO | Downloads | Careers | FAQs | Partners |            

Enquire Here

Google Adwords-PPC Basics
Learn all about PPC and Goolge adwords basics with SEM key-terms such as keyword matching options, Ad statua, CPM, CPC and CPA with adwords format and char description.

SEO Tools
Get all related info about free seo tools, free link analysis and keyword research tools, content validation tools, domain popularity and link popularity tools, broken link checker, future page rank prediction tool and search engine spider simulators etc.

Google Adwords and Google Ad-sense
Find all info about Google adwords and Google adsense programs, Google advertising services and techniques, how to create a valid google adwords and adsense account, pros and cons of using Google advertising services for the website products etc.

Link Building
We offer one-way, two-way and three-way link building services to increase website backlinks and improve link popularity. We do manual link building campaign so that your site will never be treated as spam.

HTML, XML and CSS Validations
Know how to make HTML, XML and CSS validation, where to do these validations and all other information regarding different validation techniques available. A validation improves your site believe in respect of clients and visitors.


HtAccess File | Password Protected Directory | Custom Error Pages

.htaccess File:

.htaccess file is a web server configuration file. It is saved either in root directory or in sub-directory as per requirement. By applying htaccess commands properly, one can handle web server configuration and website behavior accordingly. If you want to control the whole site then .htaccess file should be placed in root directory and if you want to control a specific directory or sub-directory then this file should be placed in that particular directory or sub-directory.

Writing htaccess file is very easy. You have to enter the appropriate commands into a text editor like Notepad. You need to save created file with name exactly as: “.htaccess” (.i.e. no name but with an 8 letter file extension). If this doesn’t apply then name it anything else (e.g. htaccessfile.txt) and upload it to the server. After uploading, you can rename it through FTP.

Custom Error Pages:

To have a professional site, there should be personal error pages instead of host error pages. Custom error pages are used to display your error massages when user requests for those pages which are not found, bad request, unauthorized access etc. If you know the error number then you can create htaccess file on that basis.
  • Code for custom error pages:     

    e.g. ErrorDocument   404   /404.html

    Some common errors are listed below:

    400 - Bad Request
    401 - Authorization Required/ Unauthorized Access
    403 – Forbidden URL
    404 - Wrong Page Request/ Page Not Found
    500 - Internal Server Error

  • .htaccess Commands: There are lots of htaccess features and utilities which are covered through .htaccess commands. Few of them are listed below.

    • Stop a directory files from being shown: If you don’t have “index file” in your directory and if some one type your directory name in his browser then all listing of files in that directory will be shown. This will not good for your site security purpose.
      To prevent against this risk, you have to enter a command into .htaccess file to stop listing directory files.      

    • Allow or Deny specific IP Addresses:
      One can allow an IP address by using:      
      One can deny an IP address by using:       

      In every group out of 4 groups, the number varies from 0 to 255. And if you only specify 1 or 2 or 3 groups of numbers, then you will deny or allow for whole range.

      One can deny all IP addresses by using:      
      But this will allow scripts to access the files in the directory.

    • Alternative Index Files: Normally, there is an “index” file in all directories and subdirectories to access. But you are not limited to access directories through index files only. By using htaccess one can set any file name (e.g. abc.html5) to behave as index file.

      Alternate index files are listed in a single line and server accesses it from Left-to-Right for checking the existence of requested file. If server finds the requested file then display it and if there is no file of requested name then display a directory listing.

    • Redirection: This is most useful feature of htaccess file is to redirect requested url or directory to a different url or directory OR on a completely different website. For this, the standard command is:

      e.g. Redirect   /old-file.html   http://www.new-site.com/new-file.html
      Redirect   /old-file.html   http://www.new-site.com/new-folder/new-file.html
      Redirect   /old-directory   http://www.new-site.com/new-directory

  • Password Protection: The most popular use of htaccess file is to protect your directory or file from unauthorized access. There are two stages to make a directory password protected. Firstly, add appropriate lines of code into .htaccess file in the directory to which you want to protect. Secondly, place .htpasswd file into the same directory which is mentioned in .htaccess file code.

    The htaccess file code:

    Where "Section Name to Protect" should be replaced by name of that section or directory which you want to protect.

  • The .htpasswd File: This file contains the user-name and password which is used to authorize and access the site. It is also a file with no name and an 8 letter extension. This file is saved with a name ".htpasswd" and can be placed anywhere into your website but it is recommended to place it outside the web root so that no one can access it from the web.
    After creating the .htpasswd file, you must supply user name and password as a command to access the site.

    The standard command is like:      

    where the password is the encrypted format of the actual password. For password encryption, you can use some pre-made scripts or write new script your own.

    There is a website named KxS takes user-name and password as input and generate user-name and encrypted password in correct output format. For multiple users, one can add extra lines into .htpasswd file code. There are lots of free scripts available for automatic user addition and removal and to manage .htpasswd file too.

  • Accessing the Website: After proper implementation of password protection technique, when anyone try to access your website, a pop-up dialog box will open for authorization your identity by user-name and password. You can also use user-name and encrypted password in the URL to access password protected area with following standard pattern:

    where password should be in encrypted format.

Google-Adwords Basics | Google-Adwords Expert | Image-Banner Ads

Cheap SEO Services India
Hire cheap seo experts and low-cost seo services in India. Our experts are talented and experienced with latest seo techniques and aware about all seo tools to perform assigned task within specified time limit.

PPC Campaign Services
We are having top-level ppc campaign managers and ppc consultants and provide ppc management services at very affordable cost. Our ppc ad players can really strengthen your business background and customer base.

Online SEO-PPC Training
E-digg.com is an online seo and ppc training provider in India as well as abroad by search engine based seo and ppc experts on daily basis or on weekend as per users convenience.

About Us | Services | Contact Us | Partners | Related-Sites | Privacy Policy | Sitemap