0

I'm migrating an existing ecommerce site (Joomla 1.5 + Virtuemart) from basic router.php SEF to Yagendoo router plugin (Virtuemart SEO SEF Links Pro). The problem is, the two create different URLs and I don't want to lose current listings, so I thought of creating a mod_rewrite 301 rule.

router.php url

http://hostname/it/home/category/<category ID>/<category name>

Yagendoo router url

http://hostname/it/<category name>

I've come up with: RewriteRule ^it/home/category/(.*)$ it/$ [R=301,L] which is almost correct, but still gives me the category number before the name. Does anyone know how I can remove the number but still keep whatever comes afterwards?

Thanks in advance for any help.

1 Answers1

0

Try something like this.

RewriteRule ^it/home/category/([^/]+)/([^/]+)$ it/$2 [R=301,L]

I did not chek it, but it is pretty easy to customize it for your purposes. The main idea is storing and in different variables($1, $2).

Ruslan Polutsygan
  • 4,401
  • 2
  • 26
  • 37