<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.12.1">
</HEAD>
<BODY>
Hello,<BR>
<BR>
I have some problems with rewrite rules.<BR>
First, excuse me for my bad English...<BR>
<BR>
I have an htacces from Apache like :<BR>
<BR>
RewriteEngine on<BR>
DirectoryIndex gabarit.php?contenu=itineraire<BR>
RewriteCond %{REQUEST_URI} !temporaire\.htm<BR>
RewriteRule ^([a-z-]*)\.htm$&nbsp; gabarit\.php?contenu=$1 [L]<BR>
RewriteRule ^galeries/$ gabarit\.php?contenu=accueil-galerie [L]<BR>
RewriteRule ^galeries/([0-9]*)/([0-9]*)\.htm$ gabarit\.php?contenu=detail-galerie&amp;categorie=$1&amp;galerie=$2 [L]<BR>
<BR>
I want to translate it to Nginx rewrite rules<BR>
<BR>
Here, a piece of my conf that doesn't work :<BR>
<BR>
&nbsp; location /<BR>
&nbsp; {<BR>
&nbsp;&nbsp;&nbsp; index gabarit.php;<BR>
&nbsp;&nbsp;&nbsp; root&nbsp; /home/work/jnbarak/current;<BR>
<BR>
&nbsp;&nbsp;&nbsp; rewrite ^/(.*)\.htm$&nbsp; /gabarit.php?contenu=$1 last; # it works !<BR>
&nbsp;&nbsp;&nbsp; rewrite ^/galeries/$ /gabarit\.php?contenu=accueil-galerie? last; # it doesn't work !<BR>
&nbsp;&nbsp;&nbsp; rewrite ^/galeries/([0-9]*)/([0-9]*)\.htm$ /gabarit\.php?contenu=detail-galerie&amp;categorie=$1&amp;galerie=$2 last; # it doesn't work !<BR>
&nbsp; }<BR>
<BR>
&nbsp; # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000<BR>
&nbsp; #<BR>
&nbsp; location ~ \.php$<BR>
&nbsp; {<BR>
&nbsp;&nbsp;&nbsp; fastcgi_pass&nbsp;&nbsp; 127.0.0.1:9000;<BR>
&nbsp;&nbsp;&nbsp; fastcgi_index&nbsp; index.php;<BR>
&nbsp;&nbsp;&nbsp; fastcgi_param&nbsp; SCRIPT_FILENAME&nbsp; /home/work/jnbarak/current$fastcgi_script_name;<BR>
&nbsp;&nbsp;&nbsp; include /usr/local/nginx/conf/fastcgi.conf;<BR>
&nbsp; }<BR>
<BR>
<BR>
When I try :<BR>
<BR>
http://my_domain.tld/galeries/<BR>
<BR>
I have the error :<BR>
<BR>
&quot;No input file specified.&quot;<BR>
<BR>
When I try :<BR>
<BR>
http://my_domain.tld/galeries/1/5.htm<BR>
<BR>
I am redirect to :<BR>
<BR>
http://my_domain.tld/gabarit.php?contenu=accueil-galerie<BR>
<BR>
<BR>
Some one can help me please ?<BR>
<BR>
J&#233;r&#233;my.
</BODY>
</HTML>