Welcome! Log In Create A New Profile

Advanced

Re: can not make WordPress pretty permalinks work

May 09, 2012 09:51AM
I made a fresh install of WordPress in a new directory and made a separate server section in nginx.conf for it.

I tired what you suggested, but to no avail. There's a small change which is that I don't get a 404 error any more and the page is displayed. My guess is that it's a different problem present in my original WordPress installation which is not present in the new one.

The problem with the pretty permalinks still remains however.

For example the WordPress sample page can have either of these two permalinks, depending on if permalinks are set to default or something else:

http://wptest.dev/?page_id=2 (default permalink setting)
http://wptest.dev/index.php/sample-page/ (any other permalink setting)

My server section in nginx.conf looks like this following your suggestion:

server {
listen 80;
server_name wptest.dev;
root /var/www/localhost/wptest;

index index.php;

location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
expires max;
}

location ~ \.php$ {
expires off;
try_files $uri =404;
include fastcgi_params;
fastcgi_pass localhost:65500;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
}
Subject Author Posted

can not make WordPress pretty permalinks work (404 error)

seron May 09, 2012 07:50AM

Re: can not make WordPress pretty permalinks work (404 error)

Edho Arief May 09, 2012 08:20AM

Re: can not make WordPress pretty permalinks work

seron May 09, 2012 09:51AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 319
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready