A
A
Anton Seredny2017-10-15 18:41:40
Regular Expressions
Anton Seredny, 2017-10-15 18:41:40

How to make a redirect without saving GET parameters?

You need to redirect from the page:
http://sd.site.ru/about.asp?page=1
to another address:
http://sd.site.ru/company.asp
Everything I tried either gave a 404 page or redirected to the desired page while maintaining ?page=1, which creates a circular redirect

# RewriteCond %{QUERY_STRING} ^page=1
# RewriteRule about.asp http://sd.site.ru/company.asp [R=301,L]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2017-10-15
@smidl

RewriteRule ^about\.asp(.*)?$ company.asp [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question