zoukankan      html  css  js  c++  java
  • CI框架CodeIgniter伪静态各种服务器设置

    Apache服务器.htaccess伪静态设置

    RewriteEngine on  
    RewriteCond $1 !^(index\.php|system\.php|images|skin|js|ls|swfupload|attachment|application|robots\.txt)  
    RewriteRule ^(.*)$ /fx/index.php/$1 [L]

    Nginx服务器伪静态设置

    location / {
            root   /var/www/html/;
            index index.html index.htm index.php;
            if ($request_filename !~* /(js|css|img|uploads|resources|robots.txt|index.php)) {
                 rewrite ^/(.*)$ /index.php?$1 last; 
            }
    }

     注:如在全局设置了root和index,此处就不需要这两项设置。

    IIS服务器web.config伪静态设置

     <system.webServer>
        <rewrite>
          <rules>
           <rule name="Imported Rule 1" stopProcessing="true">
              <match url="^/(.*)$" ignoreCase="false" />
              <conditions logicalGrouping="MatchAll">
                <add input="{R:1}" pattern="^(index.php|images|styles|scripts|uploads|resources|robots.txt)" ignoreCase="false" negate="true" />
              </conditions>
              <action type="Rewrite" url="/index.php/{R:1}" />
            </rule>
          </rules>
        </rewrite>        
      </system.webServer>

    httd.ini伪静态设置

    RewriteRule ^/(?:images|styles|scripts|uploads|resources)/(.*) $0 [L]
    RewriteRule ^/(.*)$              /$1/index.php/$2  [L]
  • 相关阅读:
    css3变换与过度
    之前做过的js练习题
    关于js中的array部分
    js复习内容
    关于js封装函数的一些东西
    html中padding和margin的区别和用法与存在的bug消除
    JS 实现百度搜索功能
    JS正则表达式的基础用法
    CSS3 动画及过渡详解
    JS的for循环小例子
  • 原文地址:https://www.cnblogs.com/xusion/p/3362468.html
Copyright © 2011-2022 走看看