Rewrite all php+args to php+args.html Q?

Hello Nginx Gurus,
We have a local mirrored with wget web site.
All dynamic files are saved like this “list.php?type=80.html
[*.php?some args dot html]” but in href tags are

How can we rewrite requested files to local html files except images,
css and js which are ok.

Regards,

Posted at Nginx Forum:

On Wed, Jun 08, 2011 at 11:26:51AM -0400, izrodix wrote:

Hello Nginx Gurus,
We have a local mirrored with wget web site.
All dynamic files are saved like this “list.php?type=80.html
[*.php?some args dot html]” but in href tags are

How can we rewrite requested files to local html files except images,
css and js which are ok.

You may try

location / {
root /path/to/files; # images, css, js
}

location ~ .php$ {
alias /path/to$request_uri.html;
}


Igor S.

Thanks a lot for the help Mr Sysoev.
It works.

Posted at Nginx Forum: