what iam trying to achieve is : to redirect a cms page to home page;
the cms page is accessible by domain.com/home
what i need is to redirect to domain/
i had already created a custom url rewrite rule from magento admin
ID Path :home(this is the url key of the cms page & this page is accessible via domain/home)
Request Path :domain/home
Target Path : domain
Redirect : Permanent 301
But no luck ! im still getting the same cms page (No redirection ) tried clearing cache but still the same result.
Best Answer
Magento, rewrite manage work whenever Request Path & Target without base url.
Why, you did tried with htaccess 301 redirection.
It is
every good idea use htaccess 301
if you using Apache as web serverOr,you can use magento event observer.
In magento,when a Cms is call,then an event
cms_page_render
is firebefore render layout
.And on this event using magento 301 redirection
(
Mage::app()->getResponse()->setRedirect(Mage::getUrl(),301)->sendResponse()
)and on basic of page identifier match
$observer->getEvent()->getPage()->getIdentifier()=='home'
You can redirect to domain.com/home page to domain.com/
config.xml:
Observer code: