htaccess URL Redirection

Unknown | 12:14 PM

# HOW TO ADD WWW in your url using htaccess

#This code will help you to add www. in the very first of url..
#if we donot put www. in front of url then automatically #www.yoururlname.com will be added 


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
</IfModule>



# How to deny your directory accessing using htaccess

# Allow or deny directory accessing

 Options -Indexes    // use + or - sign for access or deny
# or #
IndexIgnore *
 

No comments:

Post a Comment

Avinash Kumar Singh © 2013. All Rights Reserved | Powered by-Blogger