基本的に、私のサイトにアクセスする人にすべてのファイルを取得してほしくないのですが、私が試してインターネットで見つけたものはすべて、index.php の後に GET 変数を使用することを許可していません。domain.com/lol を index.php?lol に移動するように書き換えを使用しています。
これは私の現在の .htaccess ファイルです。簡単に変更できるように変更したい場合は、そちらも行ってください。
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.domain\.com [NC]
RewriteRule .? http://domain.com%{REQUEST_URI} [L,R=301]
RewriteRule ^act/(.*)$ index.php?act=$1
RewriteRule ^code/(.*)$ index.php?code=$1
RewriteRule ^login$ index.php?login
RewriteRule ^logout$ index.php?logout
RewriteRule ^add$ index.php?add
RewriteRule ^tac$ index.php?tac
RewriteRule ^profile$ index.php?profile