add nginx and apache rewrite for BT panel

This commit is contained in:
Edward Yang 2023-03-22 15:59:24 +08:00
parent 73c0b9ebf3
commit 835a7b3098
2 changed files with 26 additions and 0 deletions

21
.htaccess Normal file
View File

@ -0,0 +1,21 @@
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews -Indexes
</IfModule>
RewriteEngine On
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]
# Send Requests To Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

5
nginx.rewrite Normal file
View File

@ -0,0 +1,5 @@
# https://laravel.com/docs/9.x/deployment#nginx
location / {
try_files $uri $uri/ /index.php?$query_string;
}