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を持っています:
http://example.com/directory/index.php?q=anything
PHP が $_GET['q'] を使用してテスト変数をロードするようにします。
.htaccess でこれを単純化したい:
http://example.com/directory/anything.html
どうすればこれを行うことができますか?
このようなものを追加することができます.htaccess
.htaccess
RewriteEngine on RewriteRule ([0-9A-Za-z-\+._]+)\.html$ ./index.php?q=$1