Welcome! Log In Create A New Profile

Advanced

Rewriterule not working

Posted by libindas 
Rewriterule not working
August 07, 2013 11:56AM
Hi all,

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.

Thanks
Libin
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 178
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready