www.webdeveloper.com
Results 1 to 9 of 9

Thread: Simple Redirect for inexperienced webmaster?

Hybrid View

  1. #1
    Join Date
    Jun 2009
    Posts
    4

    Question Simple Redirect for inexperienced webmaster?

    Twelve years ago I set up a web page on GeoCities using their GUI that actually produced the HTML code.

    Now, I want to retire that page and redirect visitors to a YahooGroups page.

    I've found a number of places on the web that suggest using a "refresh" command.

    But when I try it, it doesn't work.

    You can see what happens by pointing your browser to this URL:

    http://seattlecfs.webs.com/

    If you try it, you'll see that a line of the HTML code appears on the screen, along with a link to YahooGroups, but the page never redirects.

    I've pasted in the code I'm using below. I'd be grateful to anyone who could explain to me how to get the redirection working. (Also, since our group name "SeattleCFS" comes up first in a Google search, it would be nice to set up the redirection so that we keep our Google ranking. Is that possible?)

    <html>
    <head>
    <title>Redirect to SeattleCFS YahooGroup</title>
    < content="0;url=http://health.groups.yahoo.com/group/SeattleCFS/">
    </head>
    <body>
    <p>
    Redirecting to SeattleCFS YahooGroup. If you're not redirected within a couple of seconds,
    click here:<br />
    <a href="http://health.groups.yahoo.com/group/SeattleCFS/">SeattleCFS YahooGroup</a>
    </p>
    </body>
    </html>

  2. #2
    Join Date
    Aug 2006
    Posts
    1,909
    You're missing part of that line. It should look like:
    Code:
    <meta http-equiv="REFRESH" content="0;url=http://health.groups.yahoo.com/group/SeattleCFS/">
    Dave

  3. #3
    Join Date
    May 2012
    Location
    St. Helens, UK
    Posts
    74
    Addendum: It seems that that is Google's preferred method, too: http://support.google.com/webmasters...n&answer=93633
    Crisialu Web Design
    Daihuws's Blog

    "There is no human problem which could not be solved if people would simply do as I advise."

  4. #4
    Join Date
    Jun 2009
    Posts
    4
    Quote Originally Posted by tracknut View Post
    You're missing part of that line. It should look like:
    Code:
    <meta http-equiv="REFRESH" content="0;url=http://health.groups.yahoo.com/group/SeattleCFS/">
    Dave
    Thanks, Dave,

    I've found the problem: Apparently webs.com has a filter that automatically removes
    Code:
    meta http-equiv="REFRESH"
    from the code.

    So I'm going to have to try one of the other methods suggested in this thread.

    Thanks for tipping me off to this problem,

    Will in Seattle
    a.k.a. "Clueless"

  5. #5
    Join Date
    May 2012
    Location
    St. Helens, UK
    Posts
    74
    Use of that method of redirection is considered deprecated by the W3C, though. Not sure what Google think of it, which is probably a more important consideration. ;-)

    Have you considered using PHP to redirect the header - it's very straightforward, uses all of two lines of code:
    http://www.webconfs.com/how-to-redirect-a-webpage.php
    Crisialu Web Design
    Daihuws's Blog

    "There is no human problem which could not be solved if people would simply do as I advise."

  6. #6
    Join Date
    Sep 2012
    Location
    Kampala, Uganda
    Posts
    10
    Daihuws is right if you want only two lines of code.

    You can use this code and even determine the time you want the client to take before the redirect. You might want to have then read a small advert.

    <HTML>
    <HEAD>
    <TITLE>Web Page Redirect</TITLE>
    </HEAD>

    <BODY BGCOLOR="#FFFFFF">

    <H3>Please wait a moment. You will be forwarded to Media Web</H3>
    <a href='http://www.mediauganda.com/'>Click here to go to Web Site</a>


    <meta http-equiv="Refresh" content= "1;URL=http://www.mediauganda.com/">

    </BODY>

    </HTML>

    The content in the meta refresh value 1 stand s for one second. It can be more.

  7. #7
    Join Date
    Mar 2011
    Posts
    1,139
    Google and the other search engines generally treat a <meta> refresh as a 301 redirect. When you use this tag, it's also a good idea to include a link to the destination URL on the page for those users whose browser doesn't support the <meta> tag.

    Google prefers server-based 301 redirects, but they've supported the <meta> refresh in this way for about 10 years now. Prior to that time, it was seen as potentially abusive and subject to penalties, so you'll still see a few websites warning you against this. You can safely ignore that advice.
    Rick Trethewey
    Rainbo Design

  8. #8
    Join Date
    Sep 2012
    Posts
    3
    To see a http://www.mmolive.com/ and http://www.mmohome.com/ world in a granda of stand.And a heaven in a wild flower.Hold infinity in the palm your hand and eternity in an hour.

  9. #9
    Join Date
    Aug 2012
    Location
    Belgium
    Posts
    66

    .htaccess

    I would say the best way to redirect would be to include it in your .htaccess

    Redirect to www using htaccess redirect

    Create a .htaccess file with the below code, it will ensure that all requests coming in to domain.com will get redirected to www.domain.com
    The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)

    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^domain.com [nc]
    rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]

    Please REPLACE domain.com and www.newdomain.com with your actual domain name.

    Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles