使用apachehtaccess清理url
如何转换此url使用apachehtaccess清理url,apache,.htaccess,Apache,.htaccess,如何转换此url http://example.com/vpage/page.php?number=1&status=completed 变成这样一个干净的房间 http://example.com/1/completed 因此,在我的php页面中,我可以回显变量1并完成 谢谢在您的root/.htaccess中尝试此功能 RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCon
http://example.com/vpage/page.php?number=1&status=completed
变成这样一个干净的房间
http://example.com/1/completed
因此,在我的php页面中,我可以回显变量1并完成
谢谢在您的root/.htaccess中尝试此功能
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([0-9]+)/([a-zA-Z0]+)/?$ /vpage/page.php?number=$1&status=$2 [QSA,NC,L]