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.

3 Answers 3


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 server

# Permanent URL redirect - generated by 
Redirect 301 http://domain.com/home http://domain.com/

Or,you can use magento event observer.

In magento,when a Cms is call,then an event cms_page_render is fire before render layout.

And on this event using magento 301 redirection


and on basic of page identifier match $observer->getEvent()->getPage()->getIdentifier()=='home'

You can redirect to domain.com/home page to domain.com/


<?xml version="1.0"?>

Observer code:

class ModuleNameSpace_ModuleName_Model_Observer

    public function Home301redirect($observer)
      $cmspage = $observer->getEvent();
      /* Condition match and redirect to home */
      ->setRedirect(Mage::getUrl(), 301)
  • I tried redirection with .htacces, But its not working, Iam not an expert in doing these stuff like observer :(. But why the redirection is not working as i mentioned !!!
    – Shan
    Commented Nov 29, 2015 at 13:58
  • May ur server htaccess now allow magento htaccess
    – Amit Bera
    Commented Nov 29, 2015 at 14:09

Request Path :domain/home
Target Path : domain

I think the issue come from "domain" (other Magento rewrite URLs doesn't mention it)

Try with this:

Request Path: home  
Target Path: /

Let us know if it works,

  • I tried this . But not Redirecting
    – Shan
    Commented Nov 29, 2015 at 14:19

I also had a similar issue. However it worked when I used this combination:

Request Path: home
Target Path: ../

The key points to the above are that the Request Path should not have a preceding forward slash, and the Target Path needs the preceding two dots. This is the only combination that worked on my site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.