WordPress NGINX = 302 for posts, but home works fine
-
Hello guys!
I’m trying to change the domain under which I keep my blog. In order to do so I’ve followed these steps:
– Change the guid for the wp_posts table
– Change home and siteurl options for the wp_options tableAfter that I’m using the following configuration for nginx:
server { listen 80; # your server's public IP address server_name blog.blackdojo.com; # your domain name location / { root /var/www/leonardoborges.com; # absolute path to your WordPress installation index index.php index.html index.htm; # this serves static files that exist without running other rewrite tests if (-f $request_filename) { expires 30d; break; } # this sends all non-existing file or directory requests to index.php if (!-e $request_filename) { rewrite ^(.+)$ /index.php?q=$1 last; } } location ~ \.php$ { fastcgi_pass localhost:9000; # port where FastCGI processes were spawned fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/leonardoborges.com$fastcgi_script_name; # same path as above } }
The path to wordpress is /var/www/leonardoborges.com/writings/
With this configs and steps, the home page works fine, but any post or page I click on, according to nginx logs, I get a 302 back to the home page (www.blackdojo.com/writings/)
I’ve read many posts on the web and on these forums of people with similar configuration and tried playing with the rewrite rules, but nothing worked so far.
Any ideas?
Thanks
- The topic ‘WordPress NGINX = 302 for posts, but home works fine’ is closed to new replies.