Ad

Redirect 301 Htaccess Prestashop

When create a redirect 301 for prestashop website and insert in htaccess first line of my below code for all fine. But with category and products, htaccess send all user on a page that no exist. Which settings should use for read all this parameters in prestashop urls.

#URL rewriting module activation
RewriteEngine on

Redirect 301 /contact-form.php http://sitoweb.eu/
Redirect 301 /category.php?id_category=73 http://sitoweb.eu/
Ad

Answer

To match against query strings ,You need to use RewriteCond and RewriteRule ,as Query string is not part of match in Redirect directive.

Try this instead:

RewriteEngine on

RewriteRule ^contact-form\.php$ http://siteweb.eu/ [NC,L,R]
RewriteCond %{QUERY_STRING} ^id_category=73$
RewriteRule ^category\.php$ http://siteweb.eu/ [L,R]
Ad
source: stackoverflow.com
Ad