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

Igor Sysoev igor at
Wed Jun 8 19:52:18 MSD 2011

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 
> <a href="list.php?type=80">
> 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 Sysoev

More information about the nginx mailing list