D
D
Durilka962020-11-22 17:06:17
htaccess
Durilka96, 2020-11-22 17:06:17

How to set up a .htaccess redirect?

you need to convert from this line:
https://www.example.ru/cat/dir name/1.php?id=4 to this: https://www.example.ru/cat/dir name redirect from slash to without is, i.e. you need to remove this part 1.php?id=4, and id passes the necessary parameter to open the page, and 1.php are all the same


Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2020-11-23
@shambler81

Here is the part that is clear from your TK

RewriteCond %{QUERY_STRING} (?:^|&)id\=(.+)(?:$|&)
RewriteRule ^cat/название/dir/1\.php$ /cat/название? [L,R=301]

Now, by passing GET, expand on what you mean, how do you think it is possible to send GET but not GET ?
your engine should be responsible for such art, not a new redirect.
What CMS do you have,
show all htaccess
and describe the technical specification in more detail

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question