S
S
skyfly20102016-08-24 14:06:59
Joomla
skyfly2010, 2016-08-24 14:06:59

Why doesn't 301 redirect htaccess work?

Good afternoon. I did an elementary redirect and ran into a problem - it does not work.

Redirect 301 /index.php?productID=1109 http://*****.***/krovlya/polimernaya-krovlya

At the same time, the view redirect
Redirect 301 / https://google.com/
works fine.
Z.Y. The old site was on joomla, the new one on opencart. I was given the task of redirecting some pages of the old site to the new one.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaliy Orlov, 2016-08-24
@orlov0562

Because in Redirect only url without parameters is taken into account, i.e. will work like this (redirect from /index.php to the new one):
in your case, you need to use RewriteCond and RewriteUrl, like this:

RewriteEngine On
RewriteCond %{QUERY_STRING} ^productID=1109$
RewriteRule ^/?index\.php$ http://*****.***/krovlya/polimernaya-krovlya [L,R=301]

V
Viktor Taran, 2016-08-25
@shambler81

as agreed today, the second one
/? at the end of the url "where" will delete the get request.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question