使用后
RewriteRule ^([A-Za-z0-9-]+)/?$ details.php?brandname=$1
在htaccess文件中更改test.com/details.php?brandname=abc to test.com/abc
它不直接在directoris 中打开index.php
例如test.com/dir1
,它显示白色页面,必须键入test.com/dir/index.php
才能打开
检查此代码可能会对您有所帮助。
RewriteEngine on
RewriteRule ^((?:[a-zA-Z0-9_-]|%20)+)/?$ details.php?brandname=$1