Canonical URL’s for Magento: Currently website has multiple url for one page.
Need to redirect below given url using 301 redirection, example:
http://www.example.com/index.php/
http://www.example.com/
http://example.com/index.php/
http://example.com/
to
http://www.example.com/
Need it for SEO purpose, Otherwise Search Engine is treating each page as duplicate.
2
Answers
You can follow following steps
RewriteBase /
in .htaccess. if DOCUMENT_ROOT is another directory thanRewriteBase /MAGENTO_DIR/
Alternatively, you can also redirect to virtual host
This apache redirect from non www to www might be helpful for you
Please follow the steps
Now, add below code in .htaccess file to remove index.php from url
Now add below code in .htaccess file to always redirect to http://www
Thanks