Forum Moderators: open

Message Too Old, No Replies

Redirection script: changed the page name

changed page name and now it comes as invalid link

         

Rose_1171

7:32 am on Aug 11, 2005 (gmt 0)

10+ Year Member



hi!
I changed the name of One page of my website.I tried java scripts to redirect from one page to another ( from old to new) but it does nto seem to work.
Can anyone tell me more about this, also what shoudl i do to get this bad broken link outta my website.
appreciate help
Rose

chriswragg

7:53 am on Aug 11, 2005 (gmt 0)

10+ Year Member



The standard HTML for redirects is:

<meta http-equiv="Refresh" content="0;url=http://www.example.com/link.html">

You could also use server side scripting like PHP, or even htaccess, but these are slightly more complex ways to tackle redirects.

Alternative Future

7:55 am on Aug 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Rose_1171,

You can do the redirect from old to new using a Meta tag; this will work on none JavaScript enabled browsers and also a lot of the older SE's.

<META HTTP-EQUIV=Refresh CONTENT="0; URL=newPage.html/">

>>also what shoudl i do to get this bad broken link outta my website
Sorry I do not follow completely; do you mean the old page? If so then I would leave it in place for at least a month just to make sure all the search engines are aware of the new path / page.

-Gs

encyclo

12:50 pm on Aug 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums Rose. Whilst using a meta refresh can work well, the best way of redirecting a page is to use what is called a server-side redirect - in other words, the server will intercept the request for the missing page and send that request to the new page.

Depending on your server configuration, you may be able to use a .htaccess file. You would do something like this:

Redirect permanent /oldpage.html http://www.example.com/newpage.html

You might want to do a search [google.com] of the forum for more information about redirecting with .htaccess. :)