狂雨小說cms偽靜態設置

2020-03-10 1187 19 編輯:蜀戎seo 來源:蜀戎網絡

Apache

  1. httpd.conf配置文件中加載了mod_rewrite.so模塊

  2. AllowOverride NoneNone改為All

  3. 把下面的內容保存為.htaccess文件放到應用入口文件的同級目錄下

<IfModule mod_rewrite.c>

  Options +FollowSymlinks -Multiviews

  RewriteEngine On



  RewriteCond %{REQUEST_FILENAME} !-d

  RewriteCond %{REQUEST_FILENAME} !-f

  RewriteRule ^(.*)$ index.php/$1 QSA,PT,L</IfModule>

IIS

如果你的服務器環境支持ISAPI_Rewrite的話,可以配置httpd.ini文件,添加下面的內容:

RewriteRule (.*)$ /index.php?s=$1 I

在IIS的高版本下面可以配置web.Config,在中間添加rewrite節點:

<rewrite>

 <rules>

 <rule name="OrgPage" stopProcessing="true">

 <match url="^(.*)$" />

 <conditions logicalGrouping="MatchAll">

 <add input="{HTTP_HOST}" pattern="^(.*)$" />

 <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />

 <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />

 </conditions>

 <action type="Rewrite" url="index.php/{R:1}" />

 </rule>

 </rules>

 </rewrite>

Nginx

在Nginx低版本中,是不支持PATHINFO的,但是可以通過在Nginx.conf中配置轉發規則實現:

location / { // …..省略部分代碼

   if (!-e $request_filename) {

   		rewrite  ^(.*)$  /index.php?s=/$1  last;}}

寶塔面板Nginx設置網站偽靜態

進入寶塔面板-網站-選擇要設置的網站-設置
狂雨小說偽靜態設置
選擇偽靜態-直接選擇 thinkphp-保存
狂雨小說偽靜態設置               

相關知識點: 狂雨小說cms偽靜態設置
本站文章均為蜀戎網絡摘自權威資料,書籍,或網絡原創文章,如有版權糾紛或者違規問題,請即刻聯系我們刪除,未經允許禁止復制轉載!感謝...
更多人喜歡

在線
客服

在線客服服務時間:9:00-21:00

客服
熱線

13227777380
7*24小時客服服務熱線

客服
微信

掃一掃微信咨詢
頂部
最近2019年免费中文字幕电影,最近更新2018中文国语字幕,最近中文字幕2018高清一页,一二三四免费观看视频中文版在线宜宾蜀戎网络公司