remove a specific part from url with htaccess and redirect


I was using translatepress on my wordpress site so my site urls were like but now I have removed translatepress so now my urls are like but I have submitted urls for SEO with en-ae slug. I want that if en-ae is present in any URL then it gets removed automatically and gets redirected to page without en-ae. For 1 example redirects to

>Solution :

You need the rewrite module of Apache: mod_rewrite.

Then in your htaccess this:

RewriteEngine on 
RewriteRule ^en-ae/(.*)$ $1

Leave a ReplyCancel reply