Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

WP 3.5, nginx (latest) and PHP5-FPM (latest). If you visit http://bombacarta.com/?s=coma the page is properly loaded. When you click on the link to go to the next page, you are redirected to the home page. Try it out: http://bombacarta.com/page/2/?s=coma

I don't know what's the cause to this... I think it's something related to my nginx conf for WP (because it happens on also another installation on the same VPS with same config but different theme). Here's my nginx config:

location ~ \.php$ {
    try_files $uri =404;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;           
    include /etc/nginx/fastcgi.conf;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
}

location / {
# if you're just using wordpress and don't want extra rewrites
# then replace the word @rewrites with /index.php
 try_files $uri $uri/ /index.php;

}
share|improve this question
    
Are you sure there should be a second page of results? If there isn't page 2 would trigger a 404 which I'm guessing your config code is redirecting home. –  helgatheviking Jan 25 '13 at 0:23
    
Server-configuration topics are off-topic, as they are not WordPress-specific. –  Chip Bennett Jan 25 '13 at 0:27
    
Looks like you fixed it. Care to share how? –  Pothi Jan 25 '13 at 3:24
    
It's not fixed.. look here too: luigisettembrini.gov.it/?s=scuola and luigisettembrini.gov.it/page/2/?s=scuola (there's a 2nd page for sure).. –  MultiformeIngegno Jan 25 '13 at 10:26
    
Ok I found the problem. The search parameter isn't taken into account for /page/x/ structure. In fact bombacarta.com/page/2 is the same of bombacarta.com/page/2/?s=coma –  MultiformeIngegno Jan 25 '13 at 10:28
add comment

1 Answer

up vote 1 down vote accepted

Solved changing the location block with this:

location / {
        try_files $uri $uri/ /index.php?$args;
}
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.