cancel
Showing results for 
Search instead for 
Did you mean: 

www / non www

www / non www

Hi,

 

When i go to www.example.com/product it goes to the product page, but when i go to example.com/product, it just redirects to the home page, how to fix this?

 

Thanks

2 REPLIES

Re: www / non www

have a look at .htaccess. maybe you solve it with following entry in .htaccess

 

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

 

the $1 after  domain.com is important - it is the variable for uri after domain.com/

Re: www / non www

This is not the default behavior for Magento. 

 

I suspect that there are redirect rules in your .htaccess file. Try looking into it and remove those rules. 

James Lee | Moderator • Magento Master
See My Recommended Magento Hosting & Security Tips