• prestashop nginx rewrite rule


    server {
           listen *:80;
           server_name www.mydomain.com *.mydomain.com;
           root /var/www/www.mydomain.com/web;
    
           if ($http_host != "www.mydomain.com") {
                     rewrite ^ http://www.mydomain.com$request_uri permanent;
           }
    
           index index.php index.html;
    
           location = /favicon.ico {
                    log_not_found off;
                    access_log off;
           }
    
           location = /robots.txt {
                    allow all;
                    log_not_found off;
                    access_log off;
           }
    
           # Deny all for .htaccess, .htpasswd, .DS_Store (Mac).
           location ~ /. {
                    deny all;
                    access_log off;
                    log_not_found off;
           }
    
           rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last;
           rewrite ^/([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$1$2$3.jpg last;
           rewrite ^/([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$1$2$3$4.jpg last;
           rewrite ^/([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$1$2$3$4$5.jpg last;
           rewrite ^/([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg last;
           rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg last;
           rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg last;
           rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg last;
           rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg last;
           rewrite ^/c/([0-9]+)(-[.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+.jpg$ /img/c/$1$2$3.jpg last;
           rewrite ^/c/([a-zA-Z_-]+)(-[0-9]+)?/.+.jpg$ /img/c/$1$2.jpg last;
           rewrite ^/images_ie/?([^/]+).(jpe?g|png|gif)$ /js/jquery/plugins/fancybox/images/$1.$2 last;
           error_page 404 /index.php?controller=404;
           
           location ~* .(gif)$ {
              expires 2592000s;
           }
           location ~* .(jpeg|jpg)$ {
              expires 2592000s;
           }
           location ~* .(png)$ {
              expires 2592000s;
           }
           location ~* .(css)$ {
              expires 604800s;
           }
           location ~* .(js|jsonp)$ {
              expires 604800s;
           }
           location ~* .(js)$ {
              expires 604800s;
           }
           location ~* .(ico)$ {
              expires 31536000s;
           }
    }
  • 相关阅读:
    nios sgdma(Scatter-Gather dma)示例
    关于nios 中printf 的问题
    Nios II 系统时钟timestamp的应用
    DMA在FPGA的应用之我见
    PIO Core
    VGA接口时序约束
    时序分析,重中之重,柳暗花明又一村 搞定美女了问题
    深入浅出VGA和DVI接口
    基于FPGA的VGA可移植模块终极设计
    理解FPGA中的RAM、ROM和CAM;ROM、RAM、DRAM、SRAM、FLASH
  • 原文地址:https://www.cnblogs.com/trying/p/3655847.html
Copyright © 2020-2023  润新知