Warning: mkdir(): No space left on device in /www/wwwroot/test001/func.php on line 253

Warning: file_put_contents(./cachefile_yuan/hillsideartistshouse.com/cache/ac/684fa/0c903.html): failed to open stream: No such file or directory in /www/wwwroot/test001/func.php on line 241
ThinkPHP在不同係統下的偽靜態規則匯總_網站建設_網站製作_做網站的公司_999元全包_漢獅網絡

百姓彩票

先設計 後付費,服務更有保障

2024我們與您攜手共贏,為您的企業形象保駕護航!

ThinkPHP在不同係統下的偽靜態規則匯總

在時離不了CMS係統,其中基於ThinkPHP(TP)框架的係統占絕大多數。ThinkPHP是一個快速、兼容而且簡單的輕量級國產PHP開發框架,誕生於2006年初,原名FCS,2007年元旦正式更名為ThinkPHP,遵循Apache2開源協議發布,從Struts結構移植過來並做了改進和完善,同時也借鑒了國外很多優秀的框架和模式,使用麵向對象的開發結構和MVC模式,融合了Struts的思想和TagLib(標簽庫)、RoR的ORM映射和ActiveRecord模式。

一、在Nginx下的偽靜態規則,一般命名Nginx.conf

locations / {
   if (!-e $request_filename) {
   rewrite  ^(.*)$  /index.php?s=/$1  last;
   break;
    }
 }

二、在Apache下的偽靜態規則, 一般命名.htaccess

<IfModule mod_rewrite.c>
  Options +FollowSymlinks -Multiviews
  RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
</IfModule>

三、在Windows的IIS下的偽靜態規則,一般命名web.Config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="OrgPage" stopProcessing="true">
                    <match url="^(.*)$" ></match>
                    <conditions logicalGrouping="MatchAll">
                        <add input="{HTTP_HOST}" pattern="^(.*)$" ></add>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" ></add>
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" ></add>
                    </conditions>
                    <action type="Rewrite" url="index.php/{R:1}" ></action>
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>



我漢獅網絡提供網站建設、APP軟件開發、軟件開發、小程序開發、網站網絡營銷等一站式服務,歡迎企業谘詢
免費谘詢:18838171308

先設計 後付費,服務更有保障

2024我們與您攜手共贏,為您的企業形象保駕護航!

在線客服
聯係方式

24h谘詢電話

18838171308

微信二維碼
微信