0

I have checked a lot of htaccess redirects but I can't seem to find one that suits my needs. We have an old url like this:

www.domain.com/shoes/nike/filter/gender/men

I would like a rule that checks the url for the string 'filter' and 301 redirects it to:

www.domain.com/shoes/nike

Is that possible with htaccess?

1 Answer 1

1

This should help you:

RewriteEngine On
RewriteRule (.*)/filter http://www.domain.com/$1 [R=301,L]

It simply deletes everything after "filter"

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.