mike503 at gmail.com
Sun Mar 1 22:36:29 MSK 2009
To simplify things you could just point all requests to a single handler.
rewrite ^/item-(.*).html$ /handler.php?uri=$1;
then handler.php has something like:
$uri = explode('_', filter_input(INPUT_GET, 'uri', FILTER_SANITIZE_STRING));
$_GET['ccid'] = isset($uri) ? $uri : '';
$_GET['country'] = isset($uri) ? $uri : '';
$_GET['item'] = isset($uri) ? $uri : '';
$_GET['auction'] = isset($uri) ? $uri : '';
Something of that nature
Or you could just rewrite auction.php (since it is a single script) to
include the stuff above, and instead of forcing $_GET stuff, just
assign it as $request['country'] $request['item'] etc...
(various ways but simplifies webserver configuration, which requires
administrative duties, reloading the server, if it's a multiple
webserver environment each one needs tweaked, etc) - this keeps it in
the userland and really does not add much overhead at all.
On Sun, Mar 1, 2009 at 5:58 AM, Max <maxbear at gmail.com> wrote:
> I tried to change the following apache rewrite to work under nginx. But it's
> still not working.
> RewriteEngine On
> RewriteBase /
> RewriteRule ^item-(.*)_(.*)_(.*)_(.*).html$
> RewriteRule ^item-(.*)_(.*)_(.*).html$
> RewriteRule ^item-(.*)_(.*).html$ auction.php?title=$1&item=$2
> Could anyone teach me how can I do it correctly? Thanks a lot.
More information about the nginx