.htaccess 709 B

1234567891011121314151617
  1. RewriteEngine On
  2. # The following rule tells Apache that if the requested filename
  3. # exists, simply serve it.
  4. RewriteCond %{REQUEST_FILENAME} -f [OR]
  5. RewriteCond %{REQUEST_FILENAME} -l [OR]
  6. RewriteCond %{REQUEST_FILENAME} -d
  7. RewriteRule ^.*$ - [NC,L]
  8. # The following rewrites all other queries to index.php. The
  9. # condition ensures that if you are using Apache aliases to do
  10. # mass virtual hosting, the base path will be prepended to
  11. # allow proper resolution of the index.php file; it will work
  12. # in non-aliased environments as well, providing a safe, one-size
  13. # fits all solution.
  14. RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
  15. RewriteRule ^(.*) - [E=BASE:%1]
  16. RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]