From b993b657fc1cc27687ab2cd019af966b85badfce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Gaillard?= Date: Mon, 9 Jan 2012 14:33:08 +0000 Subject: [PATCH] [-] Classes : BugFix : Added htaccess ErrorDocument 404 in case rewrite mod is not available --- classes/Tools.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/classes/Tools.php b/classes/Tools.php index 02bf4bf4a..27d672ad3 100644 --- a/classes/Tools.php +++ b/classes/Tools.php @@ -1675,6 +1675,10 @@ FileETag INode MTime Size fwrite($write_fd, $cache_control); } + // In case the user hasn't rewrite mod enabled + fwrite($write_fd, "#If rewrite mod isn't enabled\n"); + fwrite($write_fd, "ErrorDocument 404 " . $uri['physical'] . "index.php?controller=404\n\n"); + fwrite($write_fd, "# ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again\n"); fwrite($write_fd, "\n\n".trim($specific_after)); fclose($write_fd);