Wednesday, 3 December 2014

Non WWW to WWW in magento direct and Remove index.php and of the domain

#non www to www
RewriteCond %{HTTP_HOST} ^(?!www\.)(.+) [NC]
RewriteRule ^(.*) http://www.%1/$1 [R=301,NE,L]

#remove index.php after domain name
DirectoryIndex index.php\
RewriteEngine On
RewriteCond %{THE_REQUEST} /index\.php [NC]
RewriteRule ^(.*?)index\.php$ /$1 [L,R=302,NC,NE]

2 comments:

Note: only a member of this blog may post a comment.