迅睿CMS框架是一款PHP8高性能·簡單易用的CMS開源開發(fā)框架,基于MIT開源許可協(xié)議發(fā)布,免費(fèi)且不限制商業(yè)使用,是免費(fèi)開源的產(chǎn)品,以萬端互聯(lián)為設(shè)計(jì)理念,支持的微信公眾號、小程序、APP客戶端、移動端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
聯(lián)系官方銷售客服
1835022288
028-61286886
安裝后,在首頁搜索相關(guān)內(nèi)容,提示:沒有找到這個(gè)頁面: search-keyword-宋詞.html,并且只能搜索書籍,不能搜索其他內(nèi)容。
如果打開search.html頁面,顯示錯(cuò)誤:應(yīng)用程序(/www/wwwroot/***/App/Search/)不存在
rewrite設(shè)置問題,沖突了
能具體點(diǎn)么?并且search-keyword-宋詞.html沒有設(shè)置偽靜態(tài)了
把config/rewrite.php內(nèi)容復(fù)制上來
<?php
/**
* URL解析規(guī)則
* 例如: 114.html 對應(yīng) index.php?s=demo&c=show&id=114
* 可以解析: "114.html" => 'index.php?s=demo&c=show&id=114',
* 動態(tài)id解析: "([0-9]+).html" => 'index.php?s=demo&c=show&id=$1',
*/
return [
"tag\-([\w]+).html(.*)" => 'index.php?s=tag&name=$1',
//"tag\-([\u4e00-\u9fa5]+).html(.*)" => 'index.php?s=tag&name=$1',
//"([a-z]+)\/tag\-([\w]+)\-([0-9]+).html(.*)" => 'index.php?s=$1&c=category&id=$2&page=$3',
/***********************下面寫你自己的URL解析規(guī)則********************/
/***********************共享欄目測試規(guī)則:欄目列表頁面分頁的偽靜態(tài)解析*************************/
"list\-([\w]+)\-([0-9]+).html(.*)" => 'index.php?c=category&dir=$1&page=$2',
/***********************共享欄目測試規(guī)則:欄目列表頁面的偽靜態(tài)解析*************************/
"list\-([\w]+).html(.*)" => 'index.php?c=category&dir=$1',
/***********************共享欄目測試規(guī)則:內(nèi)容頁面分頁的偽靜態(tài)解析*************************/
"show\-([0-9]+)\-([0-9]+).html(.*)" => 'index.php?c=show&id=$1&page=$2',
/***********************共享欄目測試規(guī)則:內(nèi)容頁面的偽靜態(tài)解析*************************/
"show\-([0-9]+).html(.*)" => 'index.php?c=show&id=$1',
//////////////////////////////////////////////////////////////////////////////////////
/***********************獨(dú)立模塊測試規(guī)則、共享模塊測試規(guī)則:搜索頁(帶分頁)*************************/
"([a-z]+)\/search\/(.*).html(.*)" => 'index.php?s=$1&c=search&rewrite=$2',
/***********************獨(dú)立模塊測試規(guī)則、共享模塊測試規(guī)則:搜索頁(不帶分頁)*************************/
"([a-z]+)\/search.html(.*)" => 'index.php?s=$1&c=search',
/***********************獨(dú)立模塊測試規(guī)則:模塊首頁的偽靜態(tài)解析*************************/
"([a-z]+).html(.*)" => 'index.php?s=$1',
/***********************獨(dú)立模塊測試規(guī)則:欄目列表頁面分頁的偽靜態(tài)解析*************************/
"([a-z]+)\/list\/([0-9]+)\/([0-9]+).html(.*)" => 'index.php?s=$1&c=category&id=$2&page=$3',
/***********************獨(dú)立模塊測試規(guī)則:欄目列表頁面的偽靜態(tài)解析*************************/
"([a-z]+)\/list\/([0-9]+).html(.*)" => 'index.php?s=$1&c=category&id=$2',
/***********************獨(dú)立模塊測試規(guī)則:內(nèi)容頁面分頁的偽靜態(tài)解析*************************/
"([a-z]+)\/show\/([0-9]+)\/([0-9]+).html(.*)" => 'index.php?s=$1&c=show&id=$2&page=$3',
/***********************獨(dú)立模塊測試規(guī)則:內(nèi)容頁面的偽靜態(tài)解析*************************/
"([a-z]+)\/show\/([0-9]+).html(.*)" => 'index.php?s=$1&c=show&id=$2',
/**********************************************************************************************/
];
search-keyword-宋詞.html
你并沒有設(shè)置這個(gè)url的規(guī)則啊,肯定會是404或者錯(cuò)誤報(bào)
那該怎么設(shè)置呀?
參考文檔:《偽靜態(tài)設(shè)置》
回復(fù)迅??蚣軇?chuàng)始人
"([a-z]+)\/search-keyword-([\u4e00-\u9fa5]+).html(.*)" => 'index.php?s=api&c=api&m=search&dir=$1&keyword=$2',
這樣設(shè)置了還是不OK了,問題是動態(tài)的都打不了
用8樓的手冊,你這個(gè)設(shè)置是完全錯(cuò)誤的,哈哈
有沒有正確的呀配置呀,謝謝。
配置錯(cuò)了,亂寫啊大哥,其實(shí)后臺可以生成規(guī)則的,只要不要太多重復(fù)的,基本上都可以使用后臺的生成來辦
回復(fù)@gaojian5422
說到偽靜態(tài),不懂的人,還真是有點(diǎn)混亂
動態(tài)的都打不開,有可能是你沒開啟偽靜態(tài)。
如果是Apache服務(wù)器,需要在根目錄創(chuàng)建一個(gè)“.htaccess”文件,內(nèi)容是
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !.(js|ico|gif|jpe?g|bmp|png|css)$ /index.php [NC,L]
剛開始我也不會,按后臺指示來! 規(guī)則錯(cuò)了解析不了。
如果打開search.html頁面,顯示錯(cuò)誤:應(yīng)用程序(/www/wwwroot/***/App/Search/)不存在
rewrite設(shè)置問題,沖突了
能具體點(diǎn)么?并且search-keyword-宋詞.html沒有設(shè)置偽靜態(tài)了
把config/rewrite.php內(nèi)容復(fù)制上來
<?php
/**
* URL解析規(guī)則
* 例如: 114.html 對應(yīng) index.php?s=demo&c=show&id=114
* 可以解析: "114.html" => 'index.php?s=demo&c=show&id=114',
* 動態(tài)id解析: "([0-9]+).html" => 'index.php?s=demo&c=show&id=$1',
*/
return [
"tag\-([\w]+).html(.*)" => 'index.php?s=tag&name=$1',
//"tag\-([\u4e00-\u9fa5]+).html(.*)" => 'index.php?s=tag&name=$1',
//"([a-z]+)\/tag\-([\w]+)\-([0-9]+).html(.*)" => 'index.php?s=$1&c=category&id=$2&page=$3',
/***********************下面寫你自己的URL解析規(guī)則********************/
/***********************共享欄目測試規(guī)則:欄目列表頁面分頁的偽靜態(tài)解析*************************/
"list\-([\w]+)\-([0-9]+).html(.*)" => 'index.php?c=category&dir=$1&page=$2',
/***********************共享欄目測試規(guī)則:欄目列表頁面的偽靜態(tài)解析*************************/
"list\-([\w]+).html(.*)" => 'index.php?c=category&dir=$1',
/***********************共享欄目測試規(guī)則:內(nèi)容頁面分頁的偽靜態(tài)解析*************************/
"show\-([0-9]+)\-([0-9]+).html(.*)" => 'index.php?c=show&id=$1&page=$2',
/***********************共享欄目測試規(guī)則:內(nèi)容頁面的偽靜態(tài)解析*************************/
"show\-([0-9]+).html(.*)" => 'index.php?c=show&id=$1',
//////////////////////////////////////////////////////////////////////////////////////
/***********************獨(dú)立模塊測試規(guī)則、共享模塊測試規(guī)則:搜索頁(帶分頁)*************************/
"([a-z]+)\/search\/(.*).html(.*)" => 'index.php?s=$1&c=search&rewrite=$2',
/***********************獨(dú)立模塊測試規(guī)則、共享模塊測試規(guī)則:搜索頁(不帶分頁)*************************/
"([a-z]+)\/search.html(.*)" => 'index.php?s=$1&c=search',
//////////////////////////////////////////////////////////////////////////////////////
/***********************獨(dú)立模塊測試規(guī)則:模塊首頁的偽靜態(tài)解析*************************/
"([a-z]+).html(.*)" => 'index.php?s=$1',
/***********************獨(dú)立模塊測試規(guī)則:欄目列表頁面分頁的偽靜態(tài)解析*************************/
"([a-z]+)\/list\/([0-9]+)\/([0-9]+).html(.*)" => 'index.php?s=$1&c=category&id=$2&page=$3',
/***********************獨(dú)立模塊測試規(guī)則:欄目列表頁面的偽靜態(tài)解析*************************/
"([a-z]+)\/list\/([0-9]+).html(.*)" => 'index.php?s=$1&c=category&id=$2',
/***********************獨(dú)立模塊測試規(guī)則:內(nèi)容頁面分頁的偽靜態(tài)解析*************************/
"([a-z]+)\/show\/([0-9]+)\/([0-9]+).html(.*)" => 'index.php?s=$1&c=show&id=$2&page=$3',
/***********************獨(dú)立模塊測試規(guī)則:內(nèi)容頁面的偽靜態(tài)解析*************************/
"([a-z]+)\/show\/([0-9]+).html(.*)" => 'index.php?s=$1&c=show&id=$2',
/**********************************************************************************************/
];
search-keyword-宋詞.html
你并沒有設(shè)置這個(gè)url的規(guī)則啊,肯定會是404或者錯(cuò)誤報(bào)
那該怎么設(shè)置呀?
參考文檔:《偽靜態(tài)設(shè)置》
回復(fù)迅??蚣軇?chuàng)始人
這樣設(shè)置了還是不OK了,問題是動態(tài)的都打不了
這樣設(shè)置了還是不OK了,問題是動態(tài)的都打不了
用8樓的手冊,你這個(gè)設(shè)置是完全錯(cuò)誤的,哈哈
有沒有正確的呀配置呀,謝謝。
配置錯(cuò)了,亂寫啊大哥,其實(shí)后臺可以生成規(guī)則的,只要不要太多重復(fù)的,基本上都可以使用后臺的生成來辦
回復(fù)@gaojian5422
說到偽靜態(tài),不懂的人,還真是有點(diǎn)混亂
動態(tài)的都打不開,有可能是你沒開啟偽靜態(tài)。
如果是Apache服務(wù)器,需要在根目錄創(chuàng)建一個(gè)“.htaccess”文件,內(nèi)容是
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !.(js|ico|gif|jpe?g|bmp|png|css)$ /index.php [NC,L]
剛開始我也不會,按后臺指示來! 規(guī)則錯(cuò)了解析不了。