1

このような古いウェブサイト: www.example.com/oldnews.html

oldnews.html ページが現在の newnews.html に変更されました

このような新しいウェブサイト: www.example.com/newnews.html

www.example.com/oldnews.html のいずれかを入力すると、自動的にページが新しいページにリダイレクトされます =>

www.example.com/newnews.html

古いページを新しいページにページリダイレクトする方法は?

.htaccess ファイルを使用しますか?

4

2 に答える 2

9

Try this for HTML5

<meta http-equiv="refresh" content="0";url='http://www.yourdomain.com/newindex.html'">

I see below it says "Use 301 redirects if you are willing to use server-side. Meta tags, as described in the other answer, are best for client-side."

Any redirect done in the code or on a server is called server-side. When we make a change in Firefox or Chrome or any browser that changes the way an end-user interacts with the web it is called client-side.

Reference: https://www.w3.org/TR/WCAG20-TECHS/H76.html

于 2013-02-28T04:49:45.400 に答える
1

サーバー側を使用する場合は、301リダイレクトを使用します。他の回答で説明されているように、メタタグはクライアント側に最適です。

于 2013-02-28T04:50:29.880 に答える