mirror of
https://github.com/YunoHost-Apps/wordpress_ynh.git
synced 2024-09-03 20:36:10 +02:00
Add rewrite rules for permalinks
Change try rule to a rewrite rules on non-existing file so the permalink can be working without being ssoed
This commit is contained in:
parent
4c7af02333
commit
6aed76192e
1 changed files with 5 additions and 2 deletions
|
@ -4,8 +4,11 @@ location PATHTOCHANGE {
|
|||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
index index.php;
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
location ~ [^/]\.php(/|$) {
|
||||
if (!-e $request_filename)
|
||||
{
|
||||
rewrite ^(.+)$ PATHTOCHANGE/index.php?q=$1 last;
|
||||
}
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
|
|
Loading…
Add table
Reference in a new issue