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を持っています
www.example.com/nothing_here?registration=disabled
そして私はそれをにリダイレクトしたい
www.example.com/errors/418.php
URL の Nothing_here 部分を取り除くことができません。これを行う方法?
ありがとう
ドキュメント ルートの htaccess ファイルに、次を追加します。
RedirectMatch 301 ^/nothing_here$ /errors/418.php?
または mod_rewrite を使用:
RewriteEngine On RewriteCond %{QUERY_STRING} ^registration=disabled$ [NC] RewriteRule ^nothing_here$ /errors/418.php [L,R=301]