diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php
index 7e04c70729..1b2d8ded1f 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php
+++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php
@@ -52,6 +52,18 @@ class ProfilerController
$this->toolbarPosition = $toolbarPosition;
}
+ /**
+ * Redirects to the last profiles.
+ *
+ * @return RedirectResponse A RedirectResponse instance
+ */
+ public function homeAction()
+ {
+ $this->profiler->disable();
+
+ return new RedirectResponse($this->generator->generate('_profiler_search_results', array('token' => 'empty', 'limit' => 10)));
+ }
+
/**
* Renders a profiler panel for the given token.
*
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml b/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml
index 968ab8f3cb..1819e481c8 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml
+++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml
@@ -4,6 +4,10 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/routing http://symfony.com/schema/routing/routing-1.0.xsd">
+
+ web_profiler.controller.profiler:homeAction
+
+
web_profiler.controller.profiler:searchAction
@@ -52,14 +56,4 @@
web_profiler.controller.exception:cssAction
-
- FrameworkBundle:Redirect:redirect
- _profiler_search_results
- empty
-
-
-
- 10
-
-