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.
私は彼のことを知っています
RewriteEngine On RewriteCond %{HTTP_HOST} ^yourdomain\.net$ RewriteRule (.*) http://www.yourdomain.net/$1 [R=301,L]
ただし、ドメイン名がどうなるかは事前にわかりません (約 30 のうちの 1 つになる可能性があります)。yourdomain.com 変数を作成して、考えられる 30 のドメインすべてに一致するようにすることはできますか?
これらの 30 個のドメインを一致させる必要はありません。
RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule (.*) http://www.%{HTTP_HOST}/$1 [R=301,L]