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.
次の文字列を含むphpページがあります。
http://mydomain.com/businesspage.php?profile=Khafihan
だから私はこのURLを次のスタイルに変換しようとしています
http://mydomain.com/Khafihan
それはphpで可能ですか?
ご協力いただきありがとうございます。 よろしく。
この.htaccessルールはあなたが望むことをするべきだと思います:
.htaccess
RewriteEngine On RewriteRule ^([a-z0-9]+)$ /businesspage.php?profile=$1 [L]
.htaccess次の行をファイルに入れる必要があります。
RewriteEngine On RewriteRule /(.*)$ /businesspage.php?profile=$1