I am using wordpress with WPML and I came across a small issue. The previous website had the urls in this format:
domain.com/lang/title-inglish.html
eg:
-> domain.com/hello-world.html {English users}
-> domain.com/fr/hello-world.html {French users}
The problem is that WPML {Multi language plugin for wordpress} creates a new page for each translation and wordpress doesn’t allow the users to use the same title twice so it adds a suffix like so:
-> domain.com/hello-world.html {English users}
-> domain.com/fr/hello-world-2.html {French users}
The good this is that somehow domain.com/fr/hello-world.html points to domain.com/fr/hello-world-2.html just the same …
So …
What I would really need is a R 301 on hello-world-2.html to hello-world.html
I need to remove ‘-2’ {-anynumber} from my URLS
Thanks in advance!
You could do this in htaccess:
But the problem isn’t in the server, it’s in wordpress… It would be more prudent to get a better module or just patch that one.