1

Need your professional help.

I have Joomla 1.5 with VirtueMart

We change SEF, and old url was gone:(

Old url:

http://example.com/126-name-group/147101.html

126-name-group - category name 126 - category id.

147101.html - product

147101 - id product

New url:

http://example.com/katalog/product/126/147101.html

katalog/product - is constant

I'm not professional in mod_rewrite:(

Thx for your help.

e.bezdomnikov
  • 115
  • 1
  • 7
  • This is most likely not related to the mod_rewrite, but to the SEF extension rules. Different SEF extensions use different methods to produce URLs. Even if you rewrite the URLs, something will be producing the original links that you complain about, unaware of the rewrite change. You need to specify which SEF extension you are using in order to determine how to set the proper route. – MasterAM Sep 04 '13 at 09:26

1 Answers1

1

Use this rule on top of all other rules in your .htaccess

RewriteRule ^([0-9]+)-[^/]+/([0-9]+\.html)$ /katalog/product/$1/$2 [R=301,L]
Prix
  • 19,417
  • 15
  • 73
  • 132
anubhava
  • 761,203
  • 64
  • 569
  • 643