L
L
Leonid Zolotarev2020-08-27 13:21:32
htaccess
Leonid Zolotarev, 2020-08-27 13:21:32

How to set up call forwarding?

You need to redirect to htaccess from the page
/files-and-media/?download=497&k=1584014899
to
/files/1.pdf

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2020-08-27
@lzolotarev

you have a get parameter in the url, but the get is not part of the url, so you can't just select it.
Actually your answer:

RewriteCond %{QUERY_STRING} (^|&)download\=497($|&)
RewriteCond %{QUERY_STRING} (^|&)k\=1584014899($|&)
RewriteRule ^files\-and\-media/$ /files/1.pdf? [L,R=301]
And here is where it can be easily done:
https://donatstudios.com/RewriteRule_Generator

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question