Question

I have created an module and its front end name is test . Now i want a URL like

 www.exmpale.com/test/red.html (original structure is like 'test/index/index/valuid/1/').
 www.exmpale.com/test/green.html (original URL is like 'test/index/index/valueid/3/').

Wheremy crontroller is indexCrontroller and action is indexAction and where red /green ,will coming dynamic from a table. The Table is structure is like

 tab_id  value
 1      red

 2      blue
 3      green

Please help me.

Was it helpful?

Solution

You need to implement the Router for these URLs. please follow this link

http://inchoo.net/ecommerce/magento/custom-router-in-magento/

OTHER TIPS

Use 301 redirect in htaccess file as follows:

Paste the below code in your .htaccess file in root folder:

Redirect 301 /test/index/index/valuid/1/ www.exmpale.com/test/red.html

Redirect 301 /test/index/index/valuid/3/ www.exmpale.com/test/green.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top