迅睿開(kāi)源框架是一款PHP8高性能·簡(jiǎn)單易用的PHP開(kāi)源開(kāi)發(fā)框架, 基于MIT開(kāi)源許可協(xié)議發(fā)布,不限制商業(yè)使用,以多端互聯(lián)為設(shè)計(jì)理念, 支持的微信公眾號(hào)、小程序、APP客戶(hù)端、移動(dòng)端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
業(yè)務(wù)經(jīng)理
微信掃描以上二維碼
028-61286886
技術(shù)咨詢(xún)
首頁(yè)域名后出現(xiàn)index.php,并且訪問(wèn)域名+index.php/目錄/ 也能訪問(wèn)
如何取消呢?
開(kāi)源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問(wèn)題!
回復(fù)@外聘專(zhuān)員-小波工作室 已經(jīng)關(guān)閉狀態(tài)中
回復(fù)@外聘專(zhuān)員-小波工作室 從發(fā)現(xiàn)問(wèn)題開(kāi)始,這個(gè)自由參數(shù)選項(xiàng)就是這個(gè)的
現(xiàn)在查看http狀態(tài)碼如下圖
我用.htaccess來(lái)寫(xiě)偽靜態(tài)
RewriteCond %{HTTP_HOST} ^www.hrbpinpaicehua.com$ [NC]
RewriteCond %{REQUEST_URI} ^/index.php [NC]
RewriteRule .* / [R=301,L]
上述情況的http狀態(tài)碼就是301了
但是向http://www.hrbpinpaicehua.com/sitemap.xml 這些偽靜態(tài)文件就無(wú)法打開(kāi)了。
現(xiàn)在實(shí)在是不知道哪里出了問(wèn)題。
回復(fù)@華清陽(yáng)君
# index.php 301跳轉(zhuǎn)代碼!
RewriteCond %{THE_REQUEST} /index\.php [NC]
# index.php 301跳轉(zhuǎn)主頁(yè)!
RewriteRule ^index\.php$ http://www.hrbpinpaicehua.com/ [R=301,L]
# /index.php/ index.php目錄跳轉(zhuǎn)主頁(yè)!
RewriteRule ^index\.php/$ http://www.hrbpinpaicehua.com/ [R=301,L]
# /index.php/目錄/ 跳轉(zhuǎn)!
RewriteRule ^index.php/([a-zA-Z]+)/?$ http://www.hrbpinpaicehua.com/$1/ [L,R=301,QSA]
# /index.php/目錄/數(shù)字.html 跳轉(zhuǎn)!新聞頁(yè)面使用
RewriteRule ^index.php/([a-zA-Z]+)/(\d+).html$ http://www.hrbpinpaicehua.com/$1/$2.html [L,R=301,QSA]
# /index.php/目錄/數(shù)字_分頁(yè).html 跳轉(zhuǎn)!欄目分頁(yè)使用
RewriteRule ^index.php/([a-zA-Z]+)/(\d+)_(\d+)\.html$ http://www.hrbpinpaicehua.com/$1/$2_$3.html [L,R=301,QSA]
# /index.php/英文字母.html 跳轉(zhuǎn)!聚合資訊根目錄單頁(yè)使用
RewriteRule ^index.php/([a-zA-Z]+)\.html$ http://www.hrbpinpaicehua.com/$1.html [L,R=301,QSA]
# /index.php/英文字母/英文字母.html 跳轉(zhuǎn)!tag標(biāo)簽使用
RewriteRule ^index.php/([a-zA-Z]+)/([a-zA-Z]+)\.html$ http://www.hrbpinpaicehua.com/$1/$2.html [L,R=301,QSA]
# /index.php/英文字母/英文字母-p數(shù)字.html 跳轉(zhuǎn)!tag標(biāo)簽分頁(yè)使用
RewriteRule ^index.php/([a-zA-Z]+)/([a-zA-Z]+)-p(\d+)\.html$ http://www.hrbpinpaicehua.com/$1/$2-p$3.html [L,R=301,QSA]
# /index.php/英文字母/英文字母.xml 跳轉(zhuǎn)!網(wǎng)站地圖使用
RewriteRule ^index.php/([a-zA-Z]+).xml$ http://www.hrbpinpaicehua.com/$1.xml [L,R=301,QSA]
# /index.php/英文字母.txt 跳轉(zhuǎn)!網(wǎng)站地圖使用
RewriteRule ^index.php/([a-zA-Z]+).txt$ http://www.hrbpinpaicehua.com/$1.txt [L,R=301,QSA]
開(kāi)源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問(wèn)題!
回復(fù)@外聘專(zhuān)員-小波工作室

已經(jīng)關(guān)閉狀態(tài)中
開(kāi)源是一種精神,但不是義務(wù),幫忙是情分,不幫也不要抱怨,建議大家多研究代碼、多閱讀代碼、多翻閱社區(qū)歷史問(wèn)題!
回復(fù)@外聘專(zhuān)員-小波工作室 從發(fā)現(xiàn)問(wèn)題開(kāi)始,這個(gè)自由參數(shù)選項(xiàng)就是這個(gè)的
現(xiàn)在查看http狀態(tài)碼如下圖
我用.htaccess來(lái)寫(xiě)偽靜態(tài)
RewriteCond %{HTTP_HOST} ^www.hrbpinpaicehua.com$ [NC]
RewriteCond %{REQUEST_URI} ^/index.php [NC]
RewriteRule .* / [R=301,L]
上述情況的http狀態(tài)碼就是301了
但是向http://www.hrbpinpaicehua.com/sitemap.xml 這些偽靜態(tài)文件就無(wú)法打開(kāi)了。
現(xiàn)在實(shí)在是不知道哪里出了問(wèn)題。
回復(fù)@華清陽(yáng)君
# index.php 301跳轉(zhuǎn)代碼!
RewriteCond %{THE_REQUEST} /index\.php [NC]
# index.php 301跳轉(zhuǎn)主頁(yè)!
RewriteRule ^index\.php$ http://www.hrbpinpaicehua.com/ [R=301,L]
# /index.php/ index.php目錄跳轉(zhuǎn)主頁(yè)!
RewriteRule ^index\.php/$ http://www.hrbpinpaicehua.com/ [R=301,L]
# /index.php/目錄/ 跳轉(zhuǎn)!
RewriteRule ^index.php/([a-zA-Z]+)/?$ http://www.hrbpinpaicehua.com/$1/ [L,R=301,QSA]
# /index.php/目錄/數(shù)字.html 跳轉(zhuǎn)!新聞頁(yè)面使用
RewriteRule ^index.php/([a-zA-Z]+)/(\d+).html$ http://www.hrbpinpaicehua.com/$1/$2.html [L,R=301,QSA]
# /index.php/目錄/數(shù)字_分頁(yè).html 跳轉(zhuǎn)!欄目分頁(yè)使用
RewriteRule ^index.php/([a-zA-Z]+)/(\d+)_(\d+)\.html$ http://www.hrbpinpaicehua.com/$1/$2_$3.html [L,R=301,QSA]
# /index.php/英文字母.html 跳轉(zhuǎn)!聚合資訊根目錄單頁(yè)使用
RewriteRule ^index.php/([a-zA-Z]+)\.html$ http://www.hrbpinpaicehua.com/$1.html [L,R=301,QSA]
# /index.php/英文字母/英文字母.html 跳轉(zhuǎn)!tag標(biāo)簽使用
RewriteRule ^index.php/([a-zA-Z]+)/([a-zA-Z]+)\.html$ http://www.hrbpinpaicehua.com/$1/$2.html [L,R=301,QSA]
# /index.php/英文字母/英文字母-p數(shù)字.html 跳轉(zhuǎn)!tag標(biāo)簽分頁(yè)使用
RewriteRule ^index.php/([a-zA-Z]+)/([a-zA-Z]+)-p(\d+)\.html$ http://www.hrbpinpaicehua.com/$1/$2-p$3.html [L,R=301,QSA]
# /index.php/英文字母/英文字母.xml 跳轉(zhuǎn)!網(wǎng)站地圖使用
RewriteRule ^index.php/([a-zA-Z]+).xml$ http://www.hrbpinpaicehua.com/$1.xml [L,R=301,QSA]
# /index.php/英文字母.txt 跳轉(zhuǎn)!網(wǎng)站地圖使用
RewriteRule ^index.php/([a-zA-Z]+).txt$ http://www.hrbpinpaicehua.com/$1.txt [L,R=301,QSA]