Rewrite rules problems.

Roxis roxis at list.ru
Wed Jun 6 11:10:54 MSD 2007


On Wednesday 06 June 2007, Jérémy Dierx wrote:
>     rewrite ^/(.*)\.htm$  /gabarit.php?contenu=$1 last; # it works !
>     rewrite ^/galeries/$ /gabarit\.php?contenu=accueil-galerie? last; #
> it doesn't work !
>     rewrite ^/galeries/([0-9]*)/([0-9]*)\.htm$ /gabarit
> \.php?contenu=detail-galerie&categorie=$1&galerie=$2 last; # it doesn't
> work !

try this:

rewrite ^/([a-z-]+)\.htm$  /gabarit.php?contenu=$1 last;
rewrite ^/galeries/$ /gabarit.php?contenu=accueil-galerie last;
rewrite 
^/galeries/([0-9]+)/([0-9]+)\.htm$ /gabarit.php?contenu=detail-galerie&categorie=$1&galerie=$2 
last;





More information about the nginx mailing list