S
S
Sergey Beloventsev2017-04-28 16:00:57
htaccess
Sergey Beloventsev, 2017-04-28 16:00:57

How to write .htacces rule correctly?

such an address
krymray.ru//oneproduct?id=2 falls out with a 404 error I try to set up a 301 redirect like this
Redirect 301 /oneproduct?id=2 http://krymray.ru/
but the rule does not work tell me what the problem is

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tester_toster, 2017-04-28
@tester_toster

RewriteRule ^/oneproduct?id=([0-9]+)$ index.php [L,R=301]

id in $1
RewriteRule ^/oneproduct?id=([0-9]+)$ index.php?id=$1 [L,R=301]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question