Forum Moderators: phranque

Message Too Old, No Replies

How to make a page redirect?

         

kodaks

10:48 pm on Feb 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Greetings,

Currently, my site's homepage is index.htm. So when a person enters [example.com...] (my site), they get taken to index.htm as default.

I currently have a file that is located at [example.com...] I would like this page to be the new default page when a user types in [example.com...] I do not wish to move the file in the cms directory. I am wondering how I can make the redirect when a user enters my website address. I would like this redirect to be search engine friendly, and un-detectable (instant).

If anyone could help me out, I would appreciate it. Thanks in advance!

microcars

12:20 am on Feb 8, 2005 (gmt 0)

10+ Year Member



I use a META tag in the header of the index page:
<META HTTP-EQUIV=Refresh CONTENT="0;URL=http://www.example.com/cmx/index.php">

its fast, but not as "instant" as something in your .htaccess file.

err..someone else will have to help you there. or do a search on "redirect htaccess" and see what you find.

Staffa

12:21 am on Feb 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Delete everything between the <body> tags of your index.htm page and put the following line between your <header> tags.

<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www.example.com/cms/index.php">

everything on one line with a space between 0; and URL.

microcars you beat me to it

kodaks

12:44 pm on Feb 8, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thank you both! Will the Meta tag redirect effect my search engine ranking?

microcars

3:24 pm on Feb 9, 2005 (gmt 0)

10+ Year Member



what does the "space" between the "0" and the URL do?

the example I posted (no space) works fine on one of my sites, does it work different somehow with the space?

just wondering.

Staffa

8:33 pm on Feb 9, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Microcars, I don't know.
It's just that I've always used the tag with the space in it. Obviously, it looks like it works either way you might say ;o)

ska_demon

9:15 am on Feb 10, 2005 (gmt 0)

10+ Year Member



Thank you both! Will the Meta tag redirect effect my search engine ranking?

It will if you use it like did! ;-)

You can use a javascript redirect as well. A line of code on your page will call up the redirect script from another location. Again, it will affect your rankings if you use it like i did.

Ska

scatcat

9:32 am on Feb 10, 2005 (gmt 0)

10+ Year Member



Or assuming you are running the site on an Apache sever, you can use a redirect in the .htaccess file of your site, which should be located in the htdocs folder.

Add a line just like this.

Redirect 301 / [example.com...]

This will redirect the top level of your site to your new index page.
This is search engine friendly.

Good luck.

kodaks

11:09 pm on Feb 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thank you very much, I'll try that out!

MrFishGuy

1:23 am on Feb 17, 2005 (gmt 0)

10+ Year Member



Using HTTP-EQUIV, how would you make the page appear for a few seconds to maybe tell someone the page is no longer there before it redirects somewhere else? Would you change the 0 after content to a different number for seconds?

i.e. <META HTTP-EQUIV=Refresh CONTENT="5;URL=http://www.example.com/cmx/index.php">

Would that work?