Jump to content
#StayAtHome ×

TheWebExpert

New Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About TheWebExpert

  • Rank
    Newbie
  1. Well, it seemed as if that was done - but it just wasn't working. It's too big of a headache. I'm just going to set up two independent websites, and be done with it.
  2. AFAIK, what I'm trying to do IS possible - I'm just not sure what's wrong. My company has multiple hosting plans. The basic plan is one website. I can have multiple domains, but only one hosted site. I can do DNS forwarding on the 2nd domain, or an alias on the 2nd domain. If I pay extra, I can get the deluxe hosting - which can have as many websites hosted on the server as I care to dream up. What I wanted to have happen was to have my singleton website try to determine what it was the person had typed. If they typed www.mullins-storage.com, then - instead of bringing up the index.php for www.br-storage.com, it would bring up a slightly different index.php geared toward www.mullins-storage.com instead. If you're telling me that this isn't possible, then I'll have to bite the bullet and pay for the deluxe hosting, and have two individual websites.
  3. Uh. AFAIK, I need a separate hosting for multiple sites. Basic can only do one; I have multiple domains, but only one hosting... and therefore one website. If you can clue me into how I'd do multiple websites, I'd appreciate it.
  4. How is that possible? Each server can only serve ONE website. Mullins is on the same server, but can't have its own website. Therefore, there HAS to be some sort of redirect or alias or whatever, so that, with the proper code, I can detect what people were searching for - and thus make it LOOK like there are two separate websites, when, in fact there's only one.
  5. I thought that redirecting (or alias, or whatever) was the right way. If it's not an alias or redirecting, there won't be anywhere for it to go. The br-storage site goes to the br-storage site; the mullins-storage ALSO goes to the br-storage site. Isn't that what you said? That both domains should go to the same site? I'm confused. Can you explain exactly what you mean?
  6. All right, they changed it to an alias. However, the code simply times out.
  7. I am forwarding the DNS of www.mullins-storage.com to www.br-storage.com.
  8. I can't afford the deluxe hosting. With the deluxe hosting, I can have an infinite number of websites under one hosting plan. With the basic hosting, I can only have one site hosted. So, what I have is the DNS pointing the second domain to the first; if the user types "www.sam.com," they still go to "www.bob.com," but they see the content for "www.sam.com" instead, just as if it was its own site.
  9. Ok, so let's say my website is bob.com - fine. Well, I want to have sam.com also, but can't afford to pay for Deluxe hosting. So I get the domain, but I forward sam's DNS servers to point at Bob, with masking on. What I'm looking to do is to identify what the person typed in - i.e., the original, unmodified URL. Here's what I have currently: function get_redirect_target($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_NOBODY, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $headers = curl_exec($ch); curl_close($ch); // Check if there's a Location: header (redirect) if (preg_match('/^Location: (.+)$/im', $headers, $matches)) return trim($matches[1]); // If not, there was no redirect so return the original URL // (Alternatively change this to return false) return $url; } $path = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; echo get_redirect_target($path); The main problem here is that it's VERY slow. I'm also often getting a 500 error. Anyone have any ideas?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.