What I'm trying to accomplish, is to have people who go to: http://www.mydomain.com/$SEARCH-QUERY/$PAGE-NUMBER to redirect to search.php?query=SEARCH-QUERY&page=PAGE-NUMBER
I just figured out how to install nginx and configure php-fpm, mysql and everything, but now I'm a bit confused over the rewrites. Here's what I have, that doesn't appear to work correctly:
the php script will automatically assume it's the first page if no page query is sent with it, also I had to do two rewrite rules as I couldn't figure out how to implement it on one line so that it can have it with and without the trailing slash.
rewrite ^/search/(.*)$ /search.php?query=$1;
rewrite ^/search/(.*)$/ /search.php?query=$1;
and then for items viewed with paged results
rewrite ^/search/(.*)/(.*)$ /search.php?query=$1&page=$2;
rewrite ^/search/(.*)/(.*)$/ /search.php?query=$1&page=$2;
If anyone could please help, I'd appreciate it greatly!