Sorry to start another thread on this, but I have googled the web and searched the forums to no avail. There is something simple I am missing and I can’t figure it out. I appeal to your sense of humanity to knock me in the head so I can fix this thing.
Here is the root problem. When visitors come to any of my sites, they get a URL similar to the following:
http://xxx.xxx.xxx.xxx/dir/filename.ext
Obviously what I want them to see is:
http://domainName.com
I think the problem originates in that I want to host many sites/domains from a single server and a single instance of Apache. Obviously then, each website is in its own sub-directory off the document root page.
I am using godaddy.com as my DNS and their names servers, but everything else is local on my own machine (CENTOS). Their "masking" option for URL's seems rather rudimentary and "hackish" and at either rate, it causes some other issues.
So I have forwarding on at godaddy.com because it’s the only way I can figure to give them the address of my machine. The forwarding entry takes on the URL form I despise:
http://xxx.xxx.xxx.xxx/dir/filename.ext
So I have turned on mod_rewrite and tried to get it to catch any accesses and re-write them, but that seems “after the fact”. That is, it seems like mod_rewrite is not used to update or fix the URL as presented by godaddy, rather it would just filter that URL and redirect it to a logical place inside the server.
The idea I currently have is to make a single root index page and have it call the websites and then maybe I will have a chance to fix the URL, but that sounds like a hack to me.
Is the a proper way to do this? Am I missing something?