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:
http://forum.nginx.org/read.php?2,205032,205032#msg-205032

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:
http://forum.nginx.org/read.php?2,205032,205135#msg-205135

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs