Welcome! Log In Create A New Profile

Advanced

rewrite help!

Posted by rahc 
rewrite help!
January 26, 2012 01:37AM
location ^~ /media/ {
gzip_types text/plain text/html text/css;
rewrite ^/(.+)\.[0-9]+$ /$1;
}
отдает любой name.eer.js как name.eer.js.343434
как оригинальный
нужно примерно так name.eer.js на name.eer.34535.js
Т.е. по запросу script.12345678.js нужно отдавать script.js
Спасибо.
Re: rewrite help!
January 26, 2012 02:31AM
location ^~ /media/ {
gzip_types text/plain text/html text/css;
rewrite ^/(.+)\.[0-9]+\.js$ /$1.js;
}
Re: rewrite help!
January 26, 2012 02:57AM
Спасибо.
Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 83
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready