Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须(想要;)在 URL 中使用空格。我通过 htaccess 创建“可爱”的 URL:
RewriteRule ^StorageList.php/([a-zA-Z]+)/([0-9]+)/([0-9a-zA-Z%+-]+)$ StorageList.php?type=$1&users_id=$2&parts_section=$3 [L]
但是当我去 StorageList.php/Point/21/Ford Fiesta 时,我的脚本没有得到可变数据。
更改您的正则表达式以允许空格:
RewriteRule ^StorageList\.php/([a-z]+)/([0-9]+)/(.+?)/?$ StorageList.php?type=$1&users_id=$2&parts_section=$3 [L,NC,NE,QSA]