4

I have couple of urls which is generated by wordpress/php

how can I rewrite/redirect any url with -2 to the one without? The result should be

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

MonteCristo
  • 1,471
  • 2
  • 20
  • 41
  • Are you sure you need that there as a unique identifier? – Steve Robbins Aug 07 '12 at 23:34
  • I may have done what I wanted to do in a bit of a convoluted way...? I created a custom post post type so I can pull content to the homepage but actual links going to default pages... I am new to WP backend dev – MonteCristo Aug 08 '12 at 00:07

1 Answers1

2

Add this to you htaccess :

RewriteRule ^(.*)-2(.*)$ /$1$2 [NC,L,R=301]
Oussama Jilal
  • 7,669
  • 2
  • 30
  • 53