From f852f9d398d15859e5f5f34ec81efa3aee5eec7b Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Mon, 15 Aug 2016 10:03:39 +0200 Subject: [PATCH] Created htaccess --- public/.htaccess | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 public/.htaccess diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 00000000..a5c40815 --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,17 @@ +RewriteEngine On +# The following rule tells Apache that if the requested filename +# exists, simply serve it. +RewriteCond %{REQUEST_FILENAME} -s [OR] +RewriteCond %{REQUEST_FILENAME} -l [OR] +RewriteCond %{REQUEST_FILENAME} -d +RewriteRule ^.*$ - [NC,L] + +# The following rewrites all other queries to index.php. The +# condition ensures that if you are using Apache aliases to do +# mass virtual hosting, the base path will be prepended to +# allow proper resolution of the index.php file; it will work +# in non-aliased environments as well, providing a safe, one-size +# fits all solution. +RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$ +RewriteRule ^(.*) - [E=BASE:%1] +RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]