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.
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.
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!
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?
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.