A
A
Anton2016-01-09 12:58:46
Apache HTTP Server
Anton, 2016-01-09 12:58:46

How to set up a redirect to a new url (not cnc)?

Dear! I need your help.
Prestashop 1.4
web.com/category.php?id_category=5980
web.com/product.php?id_product=2263
After upgrading to prestashop 1.6
web.com/index.php?id_category=5980&controller=category
web.com/index.php? id_product=2263&controller=product
Is it possible to redirect with mod_rewrite apache?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Nalomenko, 2016-01-09
Semenov

If I understand your problem correctly, then:

RewriteEngine On

RewriteCond %{QUERY_STRING} ^id_category=([0-9]+)$
RewriteRule ^category.php?$ /index.php?id_category=%1&controller=category [R=301,L]

RewriteCond %{QUERY_STRING} ^id_product=([0-9]+)$
RewriteRule ^product.php?id_product=([0-9]+)$ /index.php?id_product=%1&controller=product [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question