我有一个php页面,其中包含以下字符串。
http://mydomain.com/businesspage.php?profile=Khafihan
所以我试图将这个url转换为以下样式的
http://mydomain.com/Khafihan
php是否可能以及如何实现?
谢谢你的帮助
当做
您需要在.htaccess
文件中放入以下行:
RewriteEngine On
RewriteRule /(.*)$ /businesspage.php?profile=$1
我认为这个.htaccess
规则应该满足您的要求:
RewriteEngine On
RewriteRule ^([a-z0-9]+)$ /businesspage.php?profile=$1 [L]