Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

AFPoster

macrumors 68000
Original poster
Jul 14, 2008
1,547
141
Charlotte, NC
So here is my question:

You have a website that with a URL links you to a home page. ie http://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 http://www.mysite.com takes me to my homepage
And http://www.thiscompany.com takes me to a certain navigation bar

Is this possible?
 

Darth.Titan

macrumors 68030
Oct 31, 2007
2,905
753
Austin, TX
In that case, the best I could think of would be an .htaccess rule that redirects all requests for http://www.thiscompany.com to http://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 http://www.thiscompany.com needs to be a separate entity from http://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.
 

AFPoster

macrumors 68000
Original poster
Jul 14, 2008
1,547
141
Charlotte, NC
In that case, the best I could think of would be an .htaccess rule that redirects all requests for http://www.thiscompany.com to http://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 http://www.thiscompany.com needs to be a separate entity from http://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.

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.
 

960design

macrumors 68040
Apr 17, 2012
3,699
1,566
Destin, FL
This is actually pretty complex and difficult to describe in a short post. Here's quick and dirty.

You purchase http://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 http://www.mysite.com, it gets routed to a domain name server to change the human words http://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 http://www.mysite.com but what is actually being looked for is 255.255.255.255/index.html.

When you point another domain http://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 http://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.
 

GDKen

macrumors newbie
Jul 18, 2012
22
1
@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.
 

SrWebDeveloper

macrumors 68000
Dec 7, 2007
1,871
3
Alexandria, VA, USA
In that case, the best I could think of would be an .htaccess rule that redirects all requests for http://www.thiscompany.com to http://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 http://www.thiscompany.com needs to be a separate entity from http://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.

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.