diff --git a/core/lib/Thelia/Admin/Controller/AdminController.php b/core/lib/Thelia/Admin/Controller/AdminController.php
index 39cdfb4fc..bb5536c7e 100755
--- a/core/lib/Thelia/Admin/Controller/AdminController.php
+++ b/core/lib/Thelia/Admin/Controller/AdminController.php
@@ -23,6 +23,7 @@
namespace Thelia\Admin\Controller;
+use Symfony\Component\HttpFoundation\Response;
use Thelia\Form\AdminLogin;
class AdminController extends BaseAdminController {
@@ -55,4 +56,12 @@ class AdminController extends BaseAdminController {
return $adminLogin->buildForm($form, array())->getForm();
}
+
+ public function lostAction()
+ {
+ return new Response(
+ $this->renderRaw("404.html"),
+ 404
+ );
+ }
}
\ No newline at end of file
diff --git a/core/lib/Thelia/Config/Resources/routing/admin.xml b/core/lib/Thelia/Config/Resources/routing/admin.xml
index 171763f56..90ecd0c1a 100755
--- a/core/lib/Thelia/Config/Resources/routing/admin.xml
+++ b/core/lib/Thelia/Config/Resources/routing/admin.xml
@@ -10,4 +10,8 @@
Thelia\Admin\Controller\AdminController::loginAction
+
+ Thelia\Admin\Controller\AdminController::lostAction
+ .*
+
\ No newline at end of file
diff --git a/core/lib/Thelia/Core/Template/Smarty/Plugins/Assetic.php b/core/lib/Thelia/Core/Template/Smarty/Plugins/Assetic.php
index 4418bd50c..f79f98a1a 100755
--- a/core/lib/Thelia/Core/Template/Smarty/Plugins/Assetic.php
+++ b/core/lib/Thelia/Core/Template/Smarty/Plugins/Assetic.php
@@ -35,7 +35,7 @@ class Assetic implements SmartyPluginInterface
{
$web_root = THELIA_WEB_DIR;
- $asset_dir_from_web_root = 'assets/admin/default'; // FIXME
+ $asset_dir_from_web_root = '/assets/admin/default'; // FIXME
$this->asset_manager = new SmartyAssetsManager($web_root, $asset_dir_from_web_root);
}
diff --git a/templates/admin/default/404.html b/templates/admin/default/404.html
new file mode 100644
index 000000000..5704c8125
--- /dev/null
+++ b/templates/admin/default/404.html
@@ -0,0 +1,14 @@
+{$page_title={intl l='Thelia'}}
+{include file='includes/header.inc.html'}
+
+
+
+
+
Oops! An Error Occurred
+ The server returned a "404 Not Found".
+
+
+
+{include file='includes/footer.inc.html'}
\ No newline at end of file
diff --git a/web/.htaccess b/web/.htaccess
index 4336ad269..57b1cf491 100755
--- a/web/.htaccess
+++ b/web/.htaccess
@@ -1,4 +1,4 @@
-Options +FollowSymlinks
+Options +FollowSymlinks -Indexes
AddDefaultCharset UTF-8
@@ -8,5 +8,5 @@ AddDefaultCharset UTF-8
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^admin(/.*)?$ index_dev.php/admin/$1 [L,QSA]
+ RewriteRule ^(.*)$ index_dev.php [L,QSA]
\ No newline at end of file