Redirect if homepage
-
12-12-2019 - |
Question
Im trying to make the Homepage invisible since im doing an integration between 2 sites and the non Magento site handles the Homepage already. So far I achieved this temporally with a JS redirect but this is a bad idea.
Is there any way to do a 301 redirect from the Homepage to another URL? For the record, the destination URL it's outside Magento.
Solution
You can have it easier than a rewrite! Just set the homepage to a url you want.
System > Config > General > Web > Default Pages > Default Web Url
There you can fill in whatever you want, e.g.
- a category:
catalog/category/view/id/7
- or a product page:
catalog/product/view/id/7
- or a cms page
This is only an internal redirect and the customer doesn't see that it is a category (that can be a downside)
OTHER TIPS
Magento provides URL rewriting, including 301 redirects.
Rewrites can be found in the admin dashboard->Catalog->URL Rewrite Management
Some more info can be found here: http://www.magentocommerce.com/knowledge-base/entry/creating-url-rewrites (even if the tutorial is for Magento Go, it's the same on Community)