Redirect 301 htaccess prestashop
Ad
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
Ad
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
Related Questions
Ad
- → Laravel 5: Apache php http authentication
- → Htaccess negation
- → OctoberCMS error in frontend - frontend is not accessible firing error "Default value for parameters with a class type hint can only be NULL"
- → How to give access execute specific php file in server?
- → 301 Redirection from no-www to www in wordpress
- → Cyclical redirection at the start laravel 5 project
- → Can't route in Laravel framework
- → How to benefit of prerender.io services if my Apache server doesn't allow a proxy
- → OctoberCMS installation MYSQL error
- → Redirect 301 htaccess prestashop
- → Permissions "public" folder Laravel
- → .htaccess affect other file url
- → How i can redirect from "www.mywebsite.com////" to "www.mywebsite.com"?
Ad