I have hundreds of duplicate pages due to a trailing - (hyphen) at the end of urls.
Now I can redirect each one separately and it works, but I'm looking for a bulk/pattern match redirect which will redirect these to save a lot of work.
http://example.co.uk/example/example- 301 redirect too http://example.co.uk/example/example
I've tried to create one with query string redirects that I know work for questions marks, but I'm having no luck.
Thanks,
This should do the trick:
RewriteRule ^(.*)-$ http://www.example.com/$1 [L,R=301]