Home » Archive

Articles Archive for October 2009

Headline, Magento »

[15 Oct 2009 | 2 Comments | 652 views]

If you want to redirect your Magento site from a non-www, ex. http://yoursite.com to http://www.yoursite.com. There is a trick there.

Enable Url rewriting (Admin Panel → System → Configuration → Web → Url Options → Use Web Server Rewrites → Yes).
Now go to your .htaccess file on your Magento folder, (you might need to back up your .htaccess before making your changes.)

below the line # 123 code:
#RewriteBase /magento/
Add these codes, to make it:

#RewriteBase /magento/
RewriteCond %{HTTP_HOST} !^www\.yoursite\.com$ [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L,R=301]

Replace yoursite.com with your own domain. Then, save your changes on your …