.htaccess文件是Apache服务器中的一个配置文件,它负责相关目录下的网页配置。php
httpd.ini文件是IIS的配置文件。html
web.config文件是一个XML文本文件,它用来储存ASP.NETWeb 应用程序的配置信息。web
.httaccess 格式:服务器
<
IfModule
mod_rewrite.c>
app
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</
IfModule
>
[ISAPI_Rewrite]
CacheClockRate 3600
RepeatLimit 32
RewriteRule /(?!Public)(?!include)(?!Uploads)(.*) /index.php\//$1 [L]
<?
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
>