2018-08-16 18:01:16 +08:00
|
|
|
<IfModule mod_rewrite.c>
|
|
|
|
<IfModule mod_negotiation.c>
|
|
|
|
Options -MultiViews -Indexes
|
|
|
|
</IfModule>
|
2016-07-24 14:14:37 +08:00
|
|
|
|
2018-08-16 18:01:16 +08:00
|
|
|
RewriteEngine On
|
2017-01-02 00:21:15 +08:00
|
|
|
|
2018-08-16 18:01:16 +08:00
|
|
|
# You may need to uncomment the following line for some hosting environments,
|
|
|
|
# if you have installed to a subdirectory, enter the name here also.
|
|
|
|
#
|
|
|
|
# RewriteBase /
|
2017-11-07 21:31:16 +08:00
|
|
|
|
2018-08-16 18:01:16 +08:00
|
|
|
# Black list protected files
|
|
|
|
RewriteRule (^\.|/\.) - [F]
|
|
|
|
RewriteRule ^storage/.* - [F]
|
2016-07-24 14:14:37 +08:00
|
|
|
|
2018-08-16 18:01:16 +08:00
|
|
|
# Redirect trailing slashes if not a folder
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
RewriteCond %{REQUEST_URI} (.+)/$
|
|
|
|
RewriteRule ^ %1 [L,R=301]
|
|
|
|
|
|
|
|
# Handle front controller
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-d
|
|
|
|
RewriteCond %{REQUEST_FILENAME} !-f
|
|
|
|
RewriteRule ^ index.php [L]
|
|
|
|
</IfModule>
|