http.ini web.config .htaccess 配置

 .htaccess文件是Apache服务器中的一个配置文件,它负责相关目录下的网页配置。

 httpd.ini文件是IIS的配置文件。

 web.config文件是一个XML文本文件,它用来储存ASP.NETWeb 应用程序的配置信息。

 

.httaccess  格式:

<IfModule mod_rewrite.c>

  Options +FollowSymlinks
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>
 
httpd.ini  格式:
[ISAPI_Rewrite]
 
CacheClockRate 3600
 
RepeatLimit 32
 
RewriteRule /(?!Public)(?!include)(?!Uploads)(.*) /index.php\//$1 [L]
 
web.config
 
 <?xml version="1.0" encoding="UTF-8"?>
 
<configuration>
 
    <system.webServer>
 
        <rewrite>
 
            <rules>
 
                <rule name="已导入的规则 1" stopProcessing="true">
 
                    <match url="^(.*)$" ignoreCase="false" />
 
                    <conditions logicalGrouping="MatchAll">
 
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
 
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
 
                    </conditions>
 
                    <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" />
 
                </rule>
                <rule name="已导入的规则 2" stopProcessing="true">
 
                    <match url="^korean/(.*)$" ignoreCase="false" />
 
                    <conditions logicalGrouping="MatchAll">
 
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
 
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
 
                    </conditions>
 
                    <action type="Rewrite" url="korean/index.php/{R:1}" appendQueryString="true" />
 
                </rule>
            </rules>
 
        </rewrite>
 
    </system.webServer>
 
</configuration>
 
 
 
 
 
posted @ 2016-01-19 14:22  121686076  阅读(747)  评论(0编辑  收藏  举报