Gallery2 rewrite rules
Marcin Gryszkalis
mg at fork.pl
Sat Oct 4 06:05:23 MSD 2008
On Tuesday of September 16 2008, nginx at donsbox.com wrote:
> That said, I'm struggling to convert the Apache mod_rewrite rules
> generated by Gallery 2 into nginx equivalents.
A bit late but may be useful (instead of pathinfo approach) - I used sth like
this:
location /v/
{
if ($request_uri !~ /main.php)
{
rewrite ^/v/(.*)$ /main.php?g2_view=core.ShowItem&g2_path=$1 last;
}
}
location /d/
{
if ($request_uri !~ /main.php)
{
rewrite /d/(\d+)-(\d+)/([^/?]+) /main.php?g2_view=core.DownloadItem&g2_itemId=$1&g2_serialNumber=$2&g2_fileName=$3
last;
}
}
regards
--
Marcin Gryszkalis, PGP 0x9F183FA3
jabber jid:mg at fork.pl, gg:2532994
http://the.fork.pl
More information about the nginx
mailing list