1

Need some help with Nginx write rule such that:

All urls of type:-

/1.1.1/xyz/abc/z.js
/2.2.2/xyz/def/c.css

are re-directed to

/xyz/abc/z.js
/xyz/def/c.css

Want to exclude the numeric part which comes at the beginning of URL.

4

2 に答える 2

3
location ~ ^/[0-9\.]+(/.*) {
    try_files $1 $1/;
}
于 2013-06-26T08:21:55.330 に答える
0

これはうまくいきます

^/(d+).(d+).(d+)/(.+)$ /$1; を書き換えます。

于 2013-06-26T04:52:53.500 に答える