【问题标题】:Nginx redirect image to the postNginx 将图片重定向到帖子
【发布时间】:2013-10-08 21:11:27
【问题描述】:

【问题讨论】:

    标签: image redirect nginx jpeg


    【解决方案1】:

    我猜你可以试试类似的东西

    location /users/image/([0-9]+) {
        try_files /node/$1.jpg =404;
    }
    

    或 不确定是否完全重写,但它应该接近这样的内容

    location /users/image/ {
        rewrite /users/image/([0-9]+).* /users/image/$1.jpg;
    }
    

    【讨论】:

      猜你喜欢
      • 2018-04-29
      • 2016-06-30
      • 2017-10-05
      • 1970-01-01
      • 2015-08-26
      • 1970-01-01
      • 2014-06-19
      • 2017-05-10
      • 1970-01-01
      相关资源
      最近更新 更多