URL Linking To Certain Page?

Discussion in 'Web Design and Development' started by AFPoster, Dec 3, 2012.

  1. macrumors 65816

    Joined:
    Jul 14, 2008
    Location:
    Charlotte, NC
    #1
    So here is my question:

    You have a website that with a URL links you to a home page. ie www.mysite.com takes me to my home page. Lets say I have several navigation items and drop-downs for these navigation items. What if I have a second URL that I want to link to a specific URL instead of the home page.

    So www.mysite.com takes me to my homepage
    And www.thiscompany.com takes me to a certain navigation bar

    Is this possible?
     
  2. macrumors 68030

    Darth.Titan

    Joined:
    Oct 31, 2007
    Location:
    Austin, TX
    #2
  3. thread starter macrumors 65816

    Joined:
    Jul 14, 2008
    Location:
    Charlotte, NC
    #3
  4. macrumors 68030

    Darth.Titan

    Joined:
    Oct 31, 2007
    Location:
    Austin, TX
    #4
    In that case, the best I could think of would be an .htaccess rule that redirects all requests for www.thiscompany.com to www.mysite.com#thiscompany. Of course that domain is going to have to be pointed to the same server as your mysite domain, which could cause all kinds of SEO issues.

    I guess I just can't understand why you would want to link a domain name to a specific part of a page that's on an entirely different domain. It sounds to me like www.thiscompany.com needs to be a separate entity from www.mysite.com, but that's just my opinion I could be wrong.

    That's all I've got. Anyone else who has a better grasp of the situation is welcome to jump in.
     
  5. thread starter macrumors 65816

    Joined:
    Jul 14, 2008
    Location:
    Charlotte, NC
    #5
    We don't want to have 2 separate sites since the "thiscompany" only has material to fill 1 page. The domains have all been purchased by GoDaddy but you bring up a good point about SEO. Maybe I should just have it redirect to another site to avoid this.
     
  6. macrumors 65816

    Joined:
    Apr 17, 2012
    Location:
    Destin, FL
    #6
    This is actually pretty complex and difficult to describe in a short post. Here's quick and dirty.

    You purchase www.mysite.com. When you tell it where to look for your server ( the IP address ) it does a little magic behind the scenes. Someone types in www.mysite.com, it gets routed to a domain name server to change the human words www.mysite.com to a computer 'phone number' or IP like 255.255.255.255, with that IP it makes a call, your server hears the request on port 80 and answers and makes a magic request, something like /index.html or /index.php. Your server config describes exactly which folder to look in for this file. What you see in the url bar would be www.mysite.com but what is actually being looked for is 255.255.255.255/index.html.

    When you point another domain www.mycompany.com to the same server IP. It answers and with a typical setup will send it to a completely different folder to look for it's own /index.hml file. To redirect this back to www.mysite.com/thiscompany you would have to intercept the default behavior with the .htaccess file or change your server config file routing.

    I tried to keep it so simple, but seem to have failed after rereading. This is also not exactly how it happens, I was trying to keep it simple.

    sorry I failed.
     
  7. macrumors newbie

    GDKen

    Joined:
    Jul 18, 2012
    #7
    @AFPoster,

    I'm with Go Daddy and came across your post.

    Were you able to get your site linked?

    I would appreciate the opportunity to assist. Feel free to direct message me.
     
  8. macrumors 68000

    SrWebDeveloper

    Joined:
    Dec 7, 2007
    Location:
    Alexandria, VA, USA
    #8
    You nailed it.

    SEO is the primary reason I also would *not* do what the OP wants to do with separate domains, page ranking can suffer by 50%. Bad reason #2 -- If they are entirely different domain names, you will want to redirect because otherwise cookies/sessions can not be shared between the two. If a user logs into your website at example1.com, they will need to log in again if they visit example2.com. If they are just different subdomains (site1.example.com vs site2.example.com via aliasing using one docroot) this won't matter. It's also easy to check which hostname is in use via code to trigger which dropdown to activate in a menu or whatever if using two subdomains.
     

Share This Page