啦啦啦www在线观看免费视频_特黄三级又爽又粗又大_国产午夜福利精品一区二区三区_末成年女AV片一区二区

丁經理:13659488805           王經理:13893343778

蘭州鋼材批發

企業文化

聯系我們

企業名稱:甘肅中力鋼鐵有限公司

聯系人:丁經理

手機:13659488805

聯系人:王經理

手機:13893343778

電話:0931—2566733  0931—2680001

網址 ://56market.cn

地址:蘭州市七里河區西津西路572號 蘭海物流鋼材總部

主營業務:蘭州鋼材、蘭州鋼材批發、蘭州鋼材廠家


企業文化

您的當前位置: 首頁 > 公司介紹 > 企業文化
針對不同服務器、虛擬空間,運行PHP的環境也有所不同,目前主要分為:Nginx、apache、IIS以及其他服務器。下面分享如何去掉URL上的index.php字符,記得最后要重啟服務器,在管理后臺清除緩存哦!
 
【IIS服務器】
在網站根目錄下有個 web.config 文件,這個文件的作用是重寫URL,讓URL變得簡短,易于SEO優化,以及用戶的記憶。打開 web.config 文件,在原有的基礎上加以下代碼片段即可。
<rewrite>
<rules>
<rule name="Imported Rule 1" enabled="true" 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>
 
以下是某個香港虛擬空間的效果:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<handlers>
<remove name="PHP-7.0-7i24.com" />
<remove name="PHP-5.6-7i24.com" />
<remove name="PHP-5.5-7i24.com" />
<remove name="PHP-5.4-7i24.com" />
<remove name="PHP-5.3-7i24.com" />
<remove name="PHP-5.2-7i24.com" />
<add name="PHP-5.4-7i24.com" path="*.php" verb="*" modules="FastCgiModule" scriptProcessor="c:php.4php-cgi.exe" resourceType="Either" />
</handlers>
<rewrite>
<rules>
<rule name="Imported Rule 1" enabled="true" 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>
</system.webServer>
</configuration>
 
【Nginx服務器】
在原有的nginx重寫文件里新增以下代碼片段:
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
}
 
【apache服務器】
易優CMS在apache服務器環境默認自動隱藏index.php入口。
如果發現沒隱藏,可以檢查根目錄.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>

如果存在,繼續查看apache是否開啟了URL重寫模塊 rewrite_module , 然后重啟服務就行了。


甘肅中力鋼鐵有限公司

聯系人:丁經理

手機:13659488805

聯系人:王經理

手機:13893343778

電話:0931—2566733  0931—2680001

地址:蘭州市七里河區西津西路572號 蘭海物流鋼材總部

主營業務:蘭州鋼材、蘭州鋼材批發、蘭州鋼材廠家

網址 :  56market.cn  


底部導航

關注我們

蘭州鋼材廠家 蘭州鋼材廠家
掃一掃