SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Mar 2004
    Location
    Makati City, Philippines
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    meta http-equiv="refresh"

    my problem is, i redirect a domain to another domain.the redirection is successfull but i want the first domain be replace with the second domain at the address bar so that they will know that the old or first domain they type is not exist anymore. i use the <meta http-equiv="refresh" content="0;URL=http://www.example.com"> the url change but the refresh is keeps on looping.how will i set the refresh to stop from looping.

    thanks!
    vhinz

  2. #2
    Original Gangster silver trophy Thing's Avatar
    Join Date
    Oct 2000
    Location
    Philadelphia, PA
    Posts
    4,708
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It would only loop if you are sending it back to itself.

    So if they go to www.test.com then you redirect them to www.example.com?? Or do you redirect them to www.test.com?

  3. #3
    SitePoint Member
    Join Date
    Mar 2004
    Location
    Makati City, Philippines
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by williamsba
    It would only loop if you are sending it back to itself.

    So if they go to www.test.com then you redirect them to www.example.com?? Or do you redirect them to www.test.com?

    ex. www.test.com >>redirect to>> www.example.com (i used test.com as alias of example.com) i want the url change from test to example automatically.i used these meta tag <meta http-equiv="refresh" content="0;URL=http://www.example.com"> to the index of example.com, it change the url but it keeps on refreshing.i hope you can help me to stop the refresh from looping...thank you in advance...

    vhinz

  4. #4
    Original Gangster silver trophy Thing's Avatar
    Join Date
    Oct 2000
    Location
    Philadelphia, PA
    Posts
    4,708
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Are you using any kind of a scripting language on your site? ex: ASP, PHP??

  5. #5
    SitePoint Member
    Join Date
    Mar 2004
    Location
    Makati City, Philippines
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by williamsba
    Are you using any kind of a scripting language on your site? ex: ASP, PHP??
    here's the index.htm of example.com

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
    <html>
    <head>
    <title>example</title>
    <meta http-equiv="refresh" content="0;URL=http://www.example.com">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

    </head>

    <frameset rows="145,*" frameborder="NO" border="0" framespacing="0">
    <frame src="head.htm" name="topFrame" scrolling="NO" >
    <frame src="main.htm" name="mainFrame">
    </frameset>
    <noframes><body>


    </body></noframes>
    </html>

  6. #6
    Original Gangster silver trophy Thing's Avatar
    Join Date
    Oct 2000
    Location
    Philadelphia, PA
    Posts
    4,708
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I really can't think of a way around that unless you use some sort of scripting language. You need an IF statement to check the address that their at, and if it matches www.example.com then don't refresh.

  7. #7
    SitePoint Member
    Join Date
    Mar 2004
    Location
    Makati City, Philippines
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by williamsba
    I really can't think of a way around that unless you use some sort of scripting language. You need an IF statement to check the address that their at, and if it matches www.example.com then don't refresh.
    ok.do you have example of that code? a java script code.


Bookmarks

Posting Permissions

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