Rewriterule not working
August 07, 2013 08:10AM
Our server needs to do the following conversion

"fromToCalendar_nw-v-29032011.js ---> fromToCalendar_nw.js"

In Apache, the rule that was being used was, "RewriteRule ^/(.*)-v[0-9.]+(\.css|\.js|\.gif|\.png|\.jpg|\.swf)$ /$1$2 [PT]"

Now we are using nginx, and we need to make the same conversion. I tried the following two rules

1.rewrite ^/(.*)-v[0-9.]+(.css|.js|.gif|.png|.jpg|.swf)$ / last;
2.rewrite ^/(.*)-v[0-9.]+(\.css|\.js|\.gif|\.png|\.jpg|\.swf)$ /$1$2 last;

But neither of them seems to be working. Would greatly appreciate if anyone can help me out.


Edited 1 time(s). Last edit at 08/07/2013 08:11AM by libindas.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 247
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