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启动
  • 相关阅读:
    素数推断算法(高效率)
    Hibernate的fetch
    TRIZ系列-创新原理-22-变害为利原理
    Offer是否具有法律效力?
    浅谈C++多态性
    C语言scanf函数详解
    大话设计模式之原型模式
    Android源码文件夹结构
    简单的REST的框架实现
    android startActivityForResult的用法
  • 原文地址:https://www.cnblogs.com/bingco/p/10796385.html
Copyright © 2011-2022 走看看