0
RewriteRule ^pages/([a-zA-Z0-9-z\-]+) load.php?p=$2
問題是下劃線(_)沒有重定向。htacces重寫不能捕捉下劃線
this works: my-page-title
not working: my_page_title
有幫助嗎?
感謝
RewriteRule ^pages/([a-zA-Z0-9-z\-]+) load.php?p=$2
問題是下劃線(_)沒有重定向。htacces重寫不能捕捉下劃線
this works: my-page-title
not working: my_page_title
有幫助嗎?
感謝
只需加方括號中的下劃線:
RewriteRule ^pages/([a-zA-Z0-9-z\-_]+) load.php?p=$1
編輯:看起來你也應該重寫它像這樣,你在那裏有一個多餘的-z
;此外,將變量更改爲$1
,因爲您只有1個組:
RewriteRule ^pages/([A-Za-z0-9\-_]+) load.php?p=$1