We accept safe and secure Credit Card and PayPal Payments.
 
Perl Scripts

All Count
Attachment Mailer
Perl Scripts Build A FAQ Plus
Perl Scripts Clock In Center
eBackup Automated
Easy Poll
eSurvey
Fetch a File
Form Maker
Mailing List Server
MySQL Mate
PDF Creation
QCart
Quick Fix
Quote of the day
Speed Search
Task Manager
Traffic Pack
Upload Plus
Upload Gold
Upload Pro
Website Manager

 
Free Perl Downloads

Free Perl Scripts Main Page
Free Perl Scripts 404 Alerter
AccessLog Viewer
Build A FAQ
PHP Scripts eBackup
Free PHP Scripts ErrorLog Viewer
eVars - Server Info
HT Pass Creator
Upload Lite
Website Manager

 
JavaScripts

Free Java Scripts Alert Boxes
Free JavaScripts Browser Sniffer
Check email
Generators
Slide Show
Sudoku
Window Maker
More...

 
Extra Utilities

ASP Scripts Ascii Codes
Free ASP Scripts Color Picker
Font Finder
HT Pass Creator
Meta Cloak
Meta Magic
Pano Zooms
SlideShow
Server Size

 
Online Tutorials

Free HTML Scripts Glossary
Free HTML Scripts HTML
JavaScript
MySQL
SSI
Build Traffic
Other

 
Miscellaneous

About Us
Graphics
Testimonials
Installations
Latest versions

 
Hawk Eye in Tennis

Should Hawk Eye replace linesmen and lineswomen at all tennis tournaments?







 
View all Polls

Run Polls on your site

Run your own Surveys

 
Store Download FAQs Contact Us Support Programming Policies  
htaccess - Basic User Authentication

User Authentication, Bandwidth Protection and Password protected directories can all achieved using a .htaccess file on a server running Apache software. It is the standard and most stable method used to protect files or access to directories. Applying directives is simple, updating and managing databases requires a little more knowledge and usually involves the integration of additional scripts coded in server side languages such as Perl or PHP.

A .htaccess file is a simple text file and can be created with any text editor. The file must be named and saved as ".htaccess", lowercase and without the quotes. Not htaccess.html, just .htaccess. htaccess is the extension. If you have never created or used a .htaccess file, create one and upload it to a temporary test directory. Because it is a text file, it must be uploaded in ASCII mode. Once uploaded, it may not appear in your directory listing, because any files that begin with a period are treated as hidden files. If you're using WS_FTP as your FTP client, you can set a command that allows you to view all files, including hidden files.

To view all files using WS_FTP, from the top menu bar select :

Sites -> Organize sites -> Right click on site name -> Properties -> Start up Tab

In the "Remote file mask" text box enter "-al". That's "dash A L" without quotes. That's a unix command for "list all files". Now see if you can find a .htaccess file. Being able to view the file in the directory listing is not necessary, but it may prove useful if you run into any problems. Whether it's visible or not, it will function.

Custom Error Pages

The simplest directives you can add to a .htaccess file are used to redirect the user if errors are encountered. For example, if a file is not found, either becuase it's been deleted from the server, or because the visitor mistyped the URL, the server returns a 404 Page not found error. Using an error directive, you can instruct the server to server up a page of your choice. The syntax is as follows :

directive error-code file

In this case, the directive we want to use is "ErrorDocument". The error code is 404. And the file is the absolute or relative path to the file that should be displayed when a 404 error is encountered or a quoted comment. In your.htaccess file, add a line that looks like the following :

ErrorDocument 404 /missing.html

Make sure that missing.html (or the file you're redirecting the visitor to) exists. Some of the most common error codes and their explanations can be found here.

Each directive you add should be on a new line. For example :

ErrorDocument 401 http://www.yourdomain.com/auth_required.html
ErrorDocument 404 /missing.html
ErrorDocument 500 "Server 500 error encountered"

Speed Search our site
Plesk Hosting
Linux servers with Plesk Control Panel, cgi-bin, crontab manager, Mysql, PHP and ASP.

Linux Hosting Plans from $9.12 per month, includes Plesk Control Panel, MySQL databases, cgi-bin, crontab manager and 50 email accounts.

Discounted Scripts
Subscribe to our periodial newsletter to receive special offers.

Bathroom Hygiene
How often do you thoroughly clean your bathroom?








View all Polls

Run Polls just like this one on your website!


About us | Contact us | Script FAQs | Script Support | Website Hosting | Our Policies | Store | Testimonials
Subscribers log in here. Subscribe to our periodical newsletter for special offers on commercial scripts, hosting, exciting business opportunities, and industry news and events. Our Mailing List Software is powered by Consolidator    
HTML Plain text
©1999 - 2015 All content Copyright PerlScriptsJavaScripts.com Proudly hosted by LinuxHostingPlans.com