tente alterá-lo para isso;
location / {
root /home/mywebsite/public;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php;
}
Meu wordpress está me dizendo para atualizar meu arquivo htaccess para:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Estou usando o nginx e tenho isso, mas não funciona:
location / {
root /home/mywebsite/public;
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ~(.+)$ /index.php?q=$1 last;
}
}
tente alterá-lo para isso;
location / {
root /home/mywebsite/public;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php;
}
Funciona perfeitamente.
E para ativar o PHP
#
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
#
# # With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
Tags nginx wordpress mod-rewrite