Hi, Need to rewrite entire site over to domain

Discussion in 'Apache' started by Inka, May 22, 2005.

  1. #1
    Hi I am kind of new here and I had a rewrite question.

    I am currently hosting my site at a free host that offers a lot of space but require a sub-domain, the thing is, I own a domain and I have another host that I am pointing the domain to anyways.

    What I want to do is make an .htaccess that lets me do this:

    point: http://www.mydomain.com/andallthefiles -> http://mysub.freehost.com/andallthefiles

    I hope I made it clear, I know it sounds confusing but any help would be great. Thank you.
     
    Inka, May 22, 2005 IP
  2. tflight

    tflight Peon

    Messages:
    617
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What you are looking for is called an HTTP 301 Redirect. If you google it you will find plenty of resources to customize it to your needs. Your .htaccess file will look something like:

    Redirect 301 / h t t p : / / m y s u b . f r e e h o s t . c o m

    But take out the spaces in your URL. I don't have enough posts yet to display URLs in posts. :(
     
    tflight, May 22, 2005 IP
  3. Inka

    Inka Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I don't want to redirect, I want to rewrite, I want it to rewrite the content on the page under the new URL, thats all.

    I can control the content on the freehost so I can make all the links link to my domain instead of the freehost file location.

    I am not worried about dupelicated content either, I won't link the actual site anywhere so it won't be indexed.

    I still need help on this matter, thanks!
     
    Inka, May 22, 2005 IP
  4. tflight

    tflight Peon

    Messages:
    617
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I guess now I'm really confused what you are looking to do.... So you want content that resides on one server to display within a URL that is pointed to a different server?
     
    tflight, May 22, 2005 IP
  5. Inka

    Inka Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks for taking the time to come back :) yeah, I want everything to be rewritten on the fly on my server with the domain and I want it to be stored on the free server with the sub-domain.

    I want exactly what your saying, except without the 301 redirecting, I don't want any redirecting, I want it to be rewritten so the address bar shows: domain.com/path(whentherespath) at all times instead of subdomain.domain.com/path(whentherespath) I don't want anyone to know that there's a free host involved, I want my site to look profesional without a subdomain, I already own the domain and everything.

    Thanks for your help, I hope I clearified that.
     
    Inka, May 22, 2005 IP
  6. Inka

    Inka Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Please help :(
     
    Inka, May 22, 2005 IP
  7. Inka

    Inka Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Sorry about that, yeah I want to make it rewrite not 301, thanks.
     
    Inka, May 22, 2005 IP
  8. huma89

    huma89 Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #8
    You can change your website mapping address. Visit varyhelp.com for more info.
     
    huma89, Oct 28, 2012 IP