Skip to content
Snippets Groups Projects
Commit cd03b229 authored by llaffont's avatar llaffont
Browse files

URL_REWRITING: le routeur supprime automatiquement le sous dossier de l'url

parent ce98fd58
Branches
Tags
No related merge requests found
......@@ -48,6 +48,21 @@ class ZendAfi_Controller_Router_RewriteWithoutBaseUrl extends Zend_Controller_Ro
return $url;
}
/**
* Find a matching route to the current PATH_INFO and inject
* returning values to the Request object.
*
* @throws Zend_Controller_Router_Exception
* @return Zend_Controller_Request_Abstract Request object
*/
public function route(Zend_Controller_Request_Abstract $request) {
$path_info = $request->getPathInfo();
if (0===strpos($path_info, BASE_URL))
$request->setPathInfo(str_replace(BASE_URL, '', $path_info));
return parent::route($request);
}
}
?>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment