.htaccess 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <IfModule mod_rewrite.c>
  2. <IfModule mod_negotiation.c>
  3. Options -MultiViews -Indexes
  4. </IfModule>
  5. RewriteEngine On
  6. RewriteRule ^(.*)$ public/$1 [L]
  7. # Handle Authorization Header
  8. RewriteCond %{HTTP:Authorization} .
  9. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  10. # Redirect Trailing Slashes If Not A Folder...
  11. RewriteCond %{REQUEST_FILENAME} !-d
  12. RewriteCond %{REQUEST_URI} (.+)/$
  13. RewriteRule ^ %1 [L,R=301]
  14. # Send Requests To front Controller...
  15. RewriteCond %{REQUEST_FILENAME} !-d
  16. RewriteCond %{REQUEST_FILENAME} !-f
  17. RewriteRule ^ index.php [L]
  18. </IfModule>
  19. ###Start Kloxo PHP config Area
  20. ### begin content - please not remove this line
  21. #<IfModule mod_rewrite.c>
  22. # ## MR -- authentically for letsencrypt for webroot-based
  23. # RewriteRule /\.|^\.(?!well-known/) - [F]
  24. #</FilesMatch>
  25. ### MR -- using php version different with default php
  26. ### 1. Using suphp
  27. ### - Copy between '#<FilesMatch \.php$>' to '#</FilesMatch>' and
  28. ### then remove '#' from '#<FilesMatch', '#</FilesMatch>' and one of '#SetHandler'
  29. #<FilesMatch \.php$>
  30. #SetHandler x-httpd-php
  31. #SetHandler x-httpd-php56
  32. #SetHandler x-httpd-php73
  33. #</FilesMatch>
  34. ### OR
  35. ### 2. Using fcgid
  36. ### - Copy from '#Options' to '#FCGIWrapper' and
  37. ### then remove '#' for one of '#FCGIWrapper'
  38. #Options +ExecCGI
  39. #<FilesMatch \.php$>
  40. # SetHandler fcgid-script
  41. #</FilesMatch>
  42. #FCGIWrapper /usr/bin/php-cgi .php
  43. #FCGIWrapper /usr/bin/php56m-cgi .php
  44. #FCGIWrapper /usr/bin/php73m-cgi .php
  45. ### end content - please not remove this line
  46. ###End Kloxo PHP config Area