# Try\_files Wordpress search

**URL:** <https://www.ruby-forum.com/t/try-files-wordpress-search/206379>\
**Category:** NGINX\
**Created:** [April 29, 2011, 2:32pm UTC](https://www.ruby-forum.com/t/try-files-wordpress-search/206379 "2011-04-29T14:32:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [April 29, 2011, 2:32pm UTC](https://www.ruby-forum.com/t/try-files-wordpress-search/206379/1 "2011-04-29T14:32:28Z")

</div>

I recently switched from using if rules for wordpress “pretty” url  
rewriting to the preffered try\_files directive. I used the configuration  
set out on this  
([http://elivz.com/blog/single/wordpress\_with\_w3tc\_on\_nginx/](http://elivz.com/blog/single/wordpress_with_w3tc_on_nginx/)) page and it  
all seemed to have been going well.

However I notice that when I perform a search on wordpress and try to  
navigate to page two of the results, it actually directs you to page two  
of the blog. I have tried this on the few places I know to have the  
try\_files rules in place and it seems to happen on all of them.

I just want to know if the issue is with nginx or with Wordpress  
internal rewriting? If its the latter then I will get in contact with  
them.

Thanks in advance!

Posted at Nginx Forum:

> **[try\_files Wordpress search](https://forum.nginx.org/read.php?2,194448,194448#msg-194448)**
>
> I recently switched from using if rules for wordpress "pretty" url rewriting to the preffered try\_files directive. I used the configuration set out on this (http://elivz.com/blog/single/wordpress\_with\_w3tc\_on\_nginx/) page and it all seemed...

---

<div class="post-metadata">

**Author:** ![okone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/e0b2c6/32.png) [@okone](https://www.ruby-forum.com/u/okone)\
**Post date:** [April 29, 2011, 2:42pm UTC](https://www.ruby-forum.com/t/try-files-wordpress-search/206379/2 "2011-04-29T14:42:57Z")

</div>

On Fri, Apr 29, 2011 at 7:14 PM, okone [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I just want to know if the issue is with nginx or with Wordpress  
> internal rewriting? If its the latter then I will get in contact with  
> them.

Probably something related with wordpress rewrite parser. Though it  
can be worked around by using

try\_files $uri $uri/ /index.php?q=$uri&$args;

instead of the recommended

try\_files $uri $uri/ /index.php;

---

<div class="post-metadata">

**Author:** ![okone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/e0b2c6/32.png) [@okone](https://www.ruby-forum.com/u/okone)\
**Post date:** [April 29, 2011, 3:40pm UTC](https://www.ruby-forum.com/t/try-files-wordpress-search/206379/3 "2011-04-29T15:40:26Z")

</div>

Wow, fast response. I thought the problem would be down to WP, it  
usually is.

This worked like a treat, so many thanks.

Posted at Nginx Forum:

> **[Re: try\_files Wordpress search](https://forum.nginx.org/read.php?2,194448,194458#msg-194458)**
>
> I recently switched from using if rules for wordpress "pretty" url rewriting to the preffered try\_files directive. I used the configuration set out on this (http://elivz.com/blog/single/wordpress\_with\_w3tc\_on\_nginx/) page and it all seemed...
