Просмотр файла public/.htaccess

Размер файла: 1.37Kb
  1. <IfModule mod_rewrite.c>
  2. RewriteEngine On
  3.  
  4. # Some hosts may require you to use the `RewriteBase` directive.
  5. # Determine the RewriteBase automatically and set it as environment variable.
  6. # If you are using Apache aliases to do mass virtual hosting or installed the
  7. # project in a subdirectory, the base path will be prepended to allow proper
  8. # resolution of the index.php file and to redirect to the correct URI. It will
  9. # work in environments without path prefix as well, providing a safe, one-size
  10. # fits all solution. But as you do not need it in this case, you can comment
  11. # the following 2 lines to eliminate the overhead.
  12. RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
  13. RewriteRule ^(.*) - [E=BASE:%1]
  14.  
  15. # If the above doesn't work you might need to set the `RewriteBase` directive manually, it should be the
  16. # absolute physical path to the directory that contains this htaccess file.
  17. # RewriteBase /
  18.  
  19. # Handle Authorization Header
  20. RewriteCond %{HTTP:Authorization} .
  21. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  22.  
  23. # Redirect Trailing Slashes If Not A Folder...
  24. RewriteCond %{REQUEST_FILENAME} !-d
  25. RewriteCond %{REQUEST_URI} (.+)/$
  26. RewriteRule ^ %1 [L,R=301]
  27.  
  28. # Send Requests To Front Controller...
  29. RewriteCond %{REQUEST_FILENAME} !-d
  30. RewriteCond %{REQUEST_FILENAME} !-f
  31. RewriteRule ^ index.php [L]
  32. </IfModule>