2

OK, it sounds simple, it looks simple and it weighs simple. But it's not. I can't for the life of me get this working.

Let's say I have this URL structure:

http://www.test.com/%action%[/%param1%/%paramX%]

I need to redirect (actually I want a REWRITE) to:

http://www.test.com/index.php?option=com_%action%&param=[%param1%,%paramX%]

For example:

http://www.test.com/product/25/allproducts/food/cakes/cheesecake

Becomes:

http://www.test.com/index.php?option=com_product&param=25,allproducts,food,cakes,cheesecake

Ideas? :-)

Jon
  • 12,684
  • 4
  • 31
  • 44
Christian
  • 27,509
  • 17
  • 111
  • 155

1 Answers1

1

if you dont mind to have this kind of parameters:

http://www.test.com/index.php?option=com_product&param=25/allproducts/food/cakes/cheesecake

you can try this rule:

RewriteRule ^([^/]*)/(.*) /index.php?option=com_$1&param=$2

it should work, but i havent check it ;)

Adam Lukaszczyk
  • 4,898
  • 3
  • 22
  • 22