I have couple of urls which is generated by wordpress/php
- http://mydomain.com/news-2/newsarticle
- http://mydomain.com/products/category-2
- http://mydomain.com/products/category/products-2
how can I rewrite/redirect any url with -2 to the one without? The result should be
- http://mydomain.com/news/newsarticle
- http://mydomain.com/products/category
- http://mydomain.com/products/category/products
This is what I have so far
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Thanks