I recently upgraded a shopsystem to prestashop and imported the previous products (~1200), and I managed to keep the old category_id
and product_id
. I'm trying to set up those 2 rules to redirect all my old incoming links to the new page, however for some reason they always end up on the 404 page instead.
So my old link was
detail.php?artikel_id=123
and now this product became
product.php?id_product=123
here is my .htaccess:
<IfModule mod_rewrite.c>
# URL rewriting module activation
RewriteEngine on
# URL rewriting rules
RewriteRule ^api/?(.*)$ /prestashop/webservice/dispatcher.php?url=$1 [QSA,L]
RewriteRule ^/prestashop/index\.php?artikeltyp=([0-9]+)$ /prestashop/category.php?id_category=$1 [L]
RewriteRule ^/index\.php?artikeltyp=([0-9]+)$ /prestashop/category.php?id_category=$1 [L]
RewriteRule ^/prestashop/detail\.php?artikel_id=([0-9]+)$ /prestashop/product.php?id_product=$1 [L]
RewriteRule ^/detail\.php?artikel_id=([0-9]+)$ /prestashop/product.php?id_product=$1 [L]
</IfModule>
# Catch 404 errors
ErrorDocument 404 /prestashop/404.php
Note that this is my test installation at my laptop, and the new shop is currently set up under "http://localhost/prestashop/"
. I tried it with and without the /prestashop/
in the rules, no effect. My .htaccess is in http://localhost/prestashop/.htaccess
.
Any idea of what I do wrong here? Did I escape it correct? How can I find out where it actually tries to redirect to me before i get the 404?