zoukankan      html  css  js  c++  java
  • jQuery火箭图标返回顶部代码

    工作中公司要求针对经销商PC端和工厂PC端的访问地址固定访问。

    经销商PC端 http://localhost/

    工厂PC端   http://localhost/fac

    文件磁盘路径:

    /crm/nginx-pages

      |---- admin

      |---- adminfac

     经销商端:

    location ^~ /admin {
                   root /crm/nginx-pages/;
                   index index.html;
                   rewrite ^/admin/(.*).*$ /admin/$1 break;
            }

      工厂端:

    location ^~ /adminfac {
                   root /crm/nginx-pages/;
                   index index.html;
                   rewrite ^/adminfac/(.*).*$ /adminfac/$1 break;
            }

     

    路由定向:

    location / {
                   if ($uri = /) {
                      rewrite / http://$host/admin? permanent;
                   }
                   if ($uri = /fac) {
                      rewrite /fac http://$host/adminfac? permanent;
                   }
                   #try_files $uri $uri/ =404;
            }

     针对url地址和nginx映射磁盘地址不一致处理。

    nginx 定向参数:
    last - 完成重写指令,之后搜索相应的URI或location。 break - 完成重写指令。 redirect - 返回302临时重定向,如果替换字段用http://开头则被使用。 permanent - 返回301永久重定向。

    其它命令:

    nginx -t -c /etc/nginx/nginx.conf #nginx校验配置文件是否可用
    nginx -s reload #nginx重新加载
    nginx -s stop #nginx停止
    nginx -c /etc/nginx/bginx.conf #nginx启动
  • 相关阅读:
    springcloud有哪些特征
    可变参数
    递归
    增强的for循环
    Scanner对象
    注释
    Markdown常见的样式语法
    副本机制
    消费者分区分配策略
    SpringMVC 登陆判断
  • 原文地址:https://www.cnblogs.com/bingco/p/10796385.html
Copyright © 2011-2022 走看看