1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to do 301 Redirect?

Discussion in 'HTML & Website Design' started by campolar, Mar 28, 2009.

Thread Status:
Not open for further replies.
  1. #1
    I know what it is, just wanna ask how do i do it?
     
    campolar, Mar 28, 2009 IP
  2. crzydream

    crzydream Active Member

    Messages:
    212
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #2
    Do you have access to your hosting portal? Who is your webhosts so i can give you specific directions?
     
    crzydream, Mar 28, 2009 IP
  3. emed

    emed Peon

    Messages:
    70
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #3
    you can do it with php
    <?
    header( "HTTP/1.1 301 Moved Permanently" );
    header( "Location: http://example.com" );
    ?>
    PHP:
     
    emed, Mar 28, 2009 IP
    crzydream and campolar like this.
  4. campolar

    campolar Peon

    Messages:
    2,683
    Likes Received:
    244
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Ok so i wanna do a 301 redirect on my FIRST website i ever made, it was on freewebs which is now chnged to webs.com

    That time i was a noob, but now i still hav good traffic on that so i wanna do a 301 redirect, they allow html, so any other way than wat emed said?
     
    campolar, Mar 29, 2009 IP
  5. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #5
    Can you create an htaccess file? If so, put this in it:
    and/or read this

    Otherwise, if you're limited to using HTML, then you can't do a 301 - you're limited to use META refresh. Which will work fine for most of your visitors, but won't do much for your search engine results or PR.
    Put this in the index.html page at your freewebs account:

    <head>
    <meta http-equiv="refresh" content="0;URL=http://www.yournewdomain.com/">
    </head>
     
    Kerosene, Mar 29, 2009 IP
    campolar and steinitz like this.
  6. campolar

    campolar Peon

    Messages:
    2,683
    Likes Received:
    244
    Best Answers:
    0
    Trophy Points:
    0
    #6
    didn't understand you with this code:
    
    redirect 301 /index.html http://whatever.webs.com
    
    HTML:
    Is whatever.webs.com the address where i'm redirecting to? bcz its a .net domain....

    so http://whatever.webs.com is my new site right?
     
    campolar, Mar 29, 2009 IP
  7. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #7
    /\ Yes. But unless you can create an htaccess file, you can't use it.
    redirect 301 /index.html [url]http://younewsitegoeshere.com[/url]
    Code (markup):
     
    Kerosene, Mar 29, 2009 IP
  8. campolar

    campolar Peon

    Messages:
    2,683
    Likes Received:
    244
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I dont think webs.com allow a .htaccess file...and still can i use that code?
     
    campolar, Mar 29, 2009 IP
  9. Kerosene

    Kerosene Alpha & Omega™ Staff

    Messages:
    11,366
    Likes Received:
    575
    Best Answers:
    4
    Trophy Points:
    385
    #9
    Not if you can't create an htaccess file.

    It looks like you're stuck with meta refresh. You get what you pay for.
     
    Kerosene, Mar 29, 2009 IP
  10. campolar

    campolar Peon

    Messages:
    2,683
    Likes Received:
    244
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Yea just forget it...i was happy already and can still be happy :p

    Thanks for all the help, rep+ to u
     
    campolar, Mar 29, 2009 IP
  11. anhbloginc

    anhbloginc Well-Known Member

    Messages:
    1,288
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    175
    #11
    anhbloginc, Mar 29, 2009 IP
    campolar likes this.
  12. campolar

    campolar Peon

    Messages:
    2,683
    Likes Received:
    244
    Best Answers:
    0
    Trophy Points:
    0
    #12
    k thanks will try it :)
     
    campolar, Mar 29, 2009 IP
  13. sajanParikh

    sajanParikh Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Yeah, I don't think you'll be able to properly setup a redirect on that host. Use a META refresh, and add a link to the body of the page.

    That's about your best bet.
     
    sajanParikh, Mar 30, 2009 IP
  14. LDews

    LDews Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    You can also use .htaccess redirects, it's more comfortable in my opinion. :)
    Here's an article that might help you out : seobook.com/archives/001714.shtml
     
    LDews, Mar 30, 2009 IP
  15. campolar

    campolar Peon

    Messages:
    2,683
    Likes Received:
    244
    Best Answers:
    0
    Trophy Points:
    0
    #15
    I already got the help i needed...

    THREAD CLOSED
     
    campolar, Mar 31, 2009 IP
  16. technomassage

    technomassage Peon

    Messages:
    48
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #16
    use this

    redirect 301 /index.html http://yourwebsite.com 
    PHP:
    Let me know if you need mroe help
     
    technomassage, Mar 31, 2009 IP
Thread Status:
Not open for further replies.