htaccess URL Redirection

Avinash singh | 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 will be added 

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

# How to deny your directory accessing using htaccess

# Allow or deny directory accessing

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

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