Friday, August 24, 2012

Create .htaccess file for the HTML site

Create one text file name is 'htaccess.txt' in the root directory of the server.
and copy below text in htaccess.txt file.

Below is a basic structure of the htaccess file.
IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>



<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName siteurl.com

Create 404 redirect syntax


Create new destination page that you want to redirect when the page is not found.
ex errorpage.html

write below code in the htaccess file.
ErrorDocument 404 /errorpage.html

and rename the text file to ".htaccess". and check it.



No comments:

Post a Comment