Try the Demo

Magento Forum

   
how to custom url rewrite for search results? 
 
e-mimic.com
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2008-10-23
China
 

I want to set a url rewrite page XXX.html to get search results http://mydomain/catalogsearch/result/?q=XXX
how to custom the url rewrite via these parameters?

ID Path *
Request Path *
Target Path *

Thank you very much!

 Signature 

We like Magento! It’s a great platform.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bristweb
Jr. Member
 
Total Posts:  15
Joined:  2008-11-13
 
e-mimic.com - 06 November 2008 04:51 AM

I want to set a url rewrite page XXX.html to get search results http://mydomain/catalogsearch/result/?q=XXX
how to custom the url rewrite via these parameters?

ID Path *
Request Path *
Target Path *


Thank you very much!

this would be very useful to know, anybody?  would also like to use the rewrites for layered navigation.

 
Magento Community Magento Community
Magento Community
Magento Community
 
t87599875
Jr. Member
 
Total Posts:  3
Joined:  2008-08-24
 

It sound very good. but the problem is that, if the search key words is same as some of categories or products, maybe some url mistakes occured.
But if some can do it, i will like it also. because it can use the .xxx to devide them.

 Signature 

Fashion Apparel Supplier: wholesale designer handbags, wholesale from china No1 Service.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Luke Berg
Jr. Member
 
Total Posts:  8
Joined:  2008-09-30
 

I was able to do this, and it seemed to work just fine..

I have no idea what the id parameter is for, so I just set it to something.. here’s what I had..

ID Path: /search/ncf-membership
Request Path: search/ncf-membership
Target Path: catalogsearch/result/?q=NCF+membership

I’m assuming you can put whatever you want for request path, just don’t start with a /

I’m using Magento version 1.2.1

 
Magento Community Magento Community
Magento Community
Magento Community
 
Wyomind
Jr. Member
 
Avatar
Total Posts:  22
Joined:  2010-11-09
 

For my part,

I was able to create url rewriting for search page in admin panel like that one :

id_path > search/test
request_path>test
target_path > catalogsearch/result/?q=test

But this did not work and I got a 404 page each time I tried to get http://www.mysite.com/test.

Looking further, I found that catalogsearch/result controller was expecting parameters as \"POST\" data and not as \"GET\" data that \’s why an error occured and send me to an 404 page.

I fixed it by writing this at line 46 in app\\code\\core\\Mage\\CatalogSearch\\controllers\\resultController.php :

$_POST[\'q\']=$_GET[\'q\'];

 Signature 

Wyomind Magento extensions
Simple Google Shopping
Data Feed Manager
Advanced Inventory
Local Stores
Orders Export Tool

 
Magento Community Magento Community
Magento Community
Magento Community
 
zlomennypez
Jr. Member
 
Total Posts:  14
Joined:  2009-05-25
 

Could you give us the code, because i get errors and itś not working. THX

 Signature 

Vše proti nadměrnému pocení a život bez pocení

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top