2

I need a rewrite rule for catalogsearch to rewrite url from :

localhost/magento/catalogsearch/result/?q=product

TO:

localhost/magento/?q=product

How to write rewrite in xml please help me.

closed as too broad by Marius Mar 21 '15 at 21:15

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • You need to only rewrite the url to somehow point to it or do you want also to point your search engine form action to that url? Option 1 is possible, option 2 is a lot of work. – mbalparda Aug 15 '14 at 20:06
  • If you find an answer, add it here as well stackoverflow.com/questions/16303097/… – Amasty Aug 15 '14 at 22:12
  • @mbalparda ..I want to go for option 1. where it somehow point to it. – satish Aug 17 '14 at 11:43
0

You can use the native rewrite feature via config.xml as follow

<global>
<rewrite>
    <designer_url>
        <from><![CDATA[#^/author/id/#]]></from>
        <to><![CDATA[/designer/index/index/id/]]></to>
        <complete>1</complete>
    </designer_url>
</rewrite>
</global>

First node is the rewrited URL and is the original URL.

  • I have tried this rule but not working for my catalog search url.. It's not affecting to url.. can you help me to write this rule for catalog search url.. – satish Aug 19 '14 at 6:25

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