Floobynooby Posted February 5, 2014 Share Posted February 5, 2014 Hi Does anyone know how to hard code a 404 error for a category that's been deleted. The category should go to a 404.php page but instead goes 302 Moved Temporarily and then redirects to index.php?controller=404. Need the deleted page to give a 404 error so that its been removed not a redirect. Have tried adding: ErrorDocument 404 /404.php to the .htaccess file but doesn't work. Also tried; <IfModule mod_rewrite.c> # Turn on rewrite engine RewriteEngine on # Force 404 on page detection ErrorDocument 404 /404.php RewriteRule ^(.*)/8-crystal-glass$ - [R=404,NC,L] </IfModule> but that doesn't work either. Does anyone know how I can force this deleted category to throw a 404 error instead of a redirect. Its needed to delete a lot of incoming links to that page. Any advice would be much appreciated. Link to comment Share on other sites More sharing options...
Floobynooby Posted February 7, 2014 Author Share Posted February 7, 2014 It appears after further investigation that any category page that is deleted or doesn't even exist gives a 302 Moved Temporarily error which directs to a 404. Is it not possible that missing categories also throw a 404? Link to comment Share on other sites More sharing options...
Floobynooby Posted February 8, 2014 Author Share Posted February 8, 2014 Does anyone know where the code is located that causes prestashop to throw a 302 when a category page is missing?? 302 redirected to 404?? Link to comment Share on other sites More sharing options...
Recommended Posts