1

Old website like this: www.example.com/oldnews.html

oldnews.html page changed to now newnews.html

New website like this: www.example.com/newnews.html

When type any one www.example.com/oldnews.html automatically page redirected to new page =>

www.example.com/newnews.html

How to page redirect old page to new page?

Use an .htaccess file?

Peter Mortensen
  • 30,030
  • 21
  • 100
  • 124
karthikeyan
  • 29
  • 1
  • 1
  • 3

2 Answers2

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

Nomis
  • 3
  • 3
Dipesh Parmar
  • 26,601
  • 7
  • 57
  • 86
1

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

Peter Mortensen
  • 30,030
  • 21
  • 100
  • 124
markasoftware
  • 11,507
  • 7
  • 39
  • 65
  • www.example.com/oldnews.html page is not there.where will i write code redirect page?i have only this page www.example.com/newnews.html. – karthikeyan Feb 28 '13 at 05:04