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.
301 リダイレクトが必要です
www.old-domain.com/simple-post/ から www.new-domain.com に移動します (new-domain.com/simple-post ではありません)
いくつかの .htaccess ルールを使用してみましたが、何もしませんでした。
mod-rewrite が有効になっています
ありがとう
このコードを header.php に配置し、"get_the_ID(1)" post(simple-post)id に渡します。リダイレクト URL を設定します。
<?php if (get_the_ID(1)) { ?> <script type="text/javascript"> window.location = "http://www.google.com"; </script> <?php } ?>