Welcome! Log In Create A New Profile

Advanced

Re: can anyone convert this mod rewrite rule

April 04, 2011 03:16PM
On Mon, Apr 04, 2011 at 02:00:06PM -0400, onel0ve wrote:
> # BEGIN DPIOptions
>
> RewriteEngine On
> RewriteRule ^thumb-(.*)\.jpg$ thumb.php?id=$1 [L]
> RewriteRule ^image-(.*)\.jpg$ image.php?id=$1 [L]
> RewriteRule ^image-(.*)\.gif$ image.php?id=$1&gif [L]
> RewriteRule ^share-(.*)\.html$ share.php?id=$1 [L]
> RewriteRule ^gallery-(.*)-(.*)-(.*)\.html$ gallery.php?id=$2&page=$3
> [L]
> RewriteRule ^gallery-(.*)-(.*)\.html$ gallery.php?id=$2 [L]
> RewriteRule ^archive-(.*)\.html$ archive.php?page=$1 [L]
> RewriteRule ^galleries-(.*)\.html$ archive.php?page=$1 [L]
> RewriteRule ^content-(.*)\.html$ content.php?$1 [L]
> RewriteRule ^profile-(.*)\.html$ profile.php?id=$1 [L]
> RewriteRule ^images-(.*)\.html$ images.php?date=$1 [L]
>
> # END DPIOptions
>
> please convert this for nginx

Here is example of scaleable configuration:

location /thumb- {
location ~ ^/thumb-(.*)\.jpg$ {
fastcgi_pass ...
fastcgi_param SCRIPT_FILENAME /path/to/thumb.php;
fastcgi_param QUERY_STRING id=$1;
}
}

location /image- {
location ~ ^/image-(.*)\.jpg$ {
fastcgi_pass ...
fastcgi_param SCRIPT_FILENAME /path/to/image.php;
fastcgi_param QUERY_STRING id=$1;
}

location ~ ^/image-(.*)\.gif$ {
fastcgi_pass ...
fastcgi_param SCRIPT_FILENAME /path/to/image.php;
fastcgi_param QUERY_STRING id=$1&gif;
}
}

etc.


--
Igor Sysoev
http://sysoev.ru/en/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

can anyone convert this mod rewrite rule

onel0ve April 04, 2011 02:00PM

Re: can anyone convert this mod rewrite rule

Igor Sysoev April 04, 2011 03:16PM

Re: can anyone convert this mod rewrite rule

Paxxil April 04, 2011 04:04PM

Re: can anyone convert this mod rewrite rule

Paxxil April 04, 2011 04:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 155
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready