: .htaccess redirect strip old system content from end of URL Looking to redirect all URLs which look similar to this: https://www.example.com/discussion/topix/random-page-title.133760/posts/1255466/rate?rating=13&_Token=78139%2C146
Looking to redirect all URLs which look similar to this:
www.example.com/discussion/topix/random-page-title.133760/posts/1255466/rate?rating=13&_Token=78139%2C1464617730%2Ca42dfb1db7e54b51db1879075650aaf4a3c3323a
to
www.example.com/discussion/topix/random-page-title.133760/
Basically removing the following from the URL:
posts/1255466/rate?rating=13&_Token=78139%2C1464617730%2Ca42dfb1db7e54b51db1879075650aaf4a3c3323a
They are parts of an old system.
More posts by @Harper822
1 Comments
Sorted by latest first Latest Oldest Best
RedirectMatch 301 ^/discussion/topix/(.*)/posts/.*$ /discussion/topix//
(.*) is a capturing group which matches anything preceding ‘posts’.
outputs the capturing group as the destination for the redirect.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.