0

is it possible to make my website redirect every link that starts with something like ​

/nl​/products/motors​/

to just

/motors/

even when a link has something like

/nl/products/motors/allotherinfo/moreinfo/ect./

to redirect something like this to

/motors/

at the moment i get loads of 404 errors because i changed my website and i think this is not good for my google rankings.

Thanks for taking the time to read this,

Sjoerd

1

You can use below code in .htaccess file

Redirect ^/nl​/products/motors​/.*$ /motors/

So here if you url will match /nl/products/motors/ then it will redirect to /motors/

-1

Redirect rule if the URL contains a certain word? Please try with the code below:

RewriteCond %{REQUEST_URI} motors
RewriteRule .* motors
  • 1
    That would be an infinite loop. – fuxia Apr 26 '17 at 11:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.