fixes
parent
a1387e26f8
commit
c45e140f47
|
@ -17,11 +17,37 @@ server {
|
|||
charset utf-8;
|
||||
|
||||
|
||||
location / {
|
||||
#try_files $uri $uri/ /index.php?$query_string;
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
TiBian
|
||||
Posted 4 years ago #
|
||||
|
||||
Here is what I use and is working perfect.
|
||||
|
||||
# Remove index.php$
|
||||
if ($request_uri ~* "^(.*/)index\.php$") {
|
||||
return 301 $1;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
|
||||
# Remove from everywhere index.php
|
||||
if ($request_uri ~* "^(.*/)index\.php(/?)(.*)") {
|
||||
return 301 $1$3;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# Remove trailing slash.
|
||||
if (!-d $request_filename) {
|
||||
rewrite ^/(.+)/$ /$1 permanent;
|
||||
}
|
||||
|
||||
# Clean Double Slashes
|
||||
if ($request_uri ~* "\/\/") {
|
||||
rewrite ^/(.*) /$1 permanent;
|
||||
}
|
||||
|
||||
|
||||
location = /favicon.ico {
|
||||
access_log off;
|
||||
log_not_found off;
|
||||
|
|
Loading…
Reference in New Issue