views:

218

answers:

7

There is a website www.example.net and it has a Forum link on its home page which leads to forum.example.com/content.

I found out that the main site has been developed using the .NET Framework, and the forum has been built using PHP based vBulletin.

Are these two different domains?

In other words, is the Forum some folder inside the Visual Studio Project www.example.net running as part of the ASP.NET website? Or is "forum.example.com/content a link to an altogether different website?

+7  A: 

IIS can run PHP code, see here.

So if both are coming from the same server, chances are that the /content part is a virtual directory or application that runs php as part of the same site.

However, your domain names are different - .co.uk and .com can easily be different servers and sites. The easiest way to find out is to ping each domain and see if they are using different IP addresses. If so, they are most probably different servers and sites (though not absolutely certain).

Oded
Two domains with two different IP addresses still could be on the same server, no? Admittedly they'd most likely be very similar IP addresses. And vice versa - two sub domains of a domain could have different IP addresses and be on different servers
Simon
@Simon - of course they could, but this is highly unlikely.
Oded
I agree it's unlikely, and I'm not down voting - just thought it was best to clarify as otherwise the last sentence in your answer could sound a bit absolute.
Simon
@Simon - fair point, did not mean it to be absolute. Answer clarified :)
Oded
Cool - I wasn't trying to be a pedant or pick fault - just thought the answer would be more complete and general. Up voted :)
Simon
+1  A: 

It is possible to run Asp.NET and PHP on the same host server. So they may be on the same server.

The other way to find out if they are on different servers is to ping the URLs and see if they resolve to the same IP.

Moin Zaman
If the domain is the same domain, it will not resolve to a different IP.
Oded
see JW's answer below. there are many possibilities. also see the domains are not the same.. .com and .co.uk
Moin Zaman
@Oded what domain?
Col. Shrapnel
@Moin Zaman - fair enough. Didn't notice the different domains there.
Oded
+3  A: 

It could be a variety of set-ups.

For example forum.blahblah.com/content and www.blahblah.co.uk can be on completely different machines at opposite ends of the Earth.

Just because the domain names are similar does not have to mean that the underlying implementations are joined.

Try doing a DNS lookup on the domain names and use some web tools to investigate the site's IP addresses - this might shed light on it.

See: http://www.dnsstuff.com/

Personally speaking, If my main site was .NET and I was adding a 3rd party PHP forum - I'd stick it on a different machine.

Update in response to the "Why Are You Asking" comment discussion, below

"basically trying to figure out how to make asp.net website and php based forum work together"

I wouldn't get too hung up on making them work together 'physically on a machine'. I've spend hours trying to untangle, separate and modularize my code and so I hate to see you struggling to merge yours together. ;o)

Keeping them as separate systems and defining the HTTP interface between them is probably simpler.

If you want 'one login' for both components, then that is possible to keep them separate AND share identity using things like OpenID - http://openid.net/developers

Quote: "OpenID is a decentralized authentication protocol"

This video on REST is a brilliant intro to the (often overlooked) power of HTTP - http://www.youtube.com/watch?v=YCcAE2SCQ6k

Quote: "REST is the architecture of the web as it works today...Shouldn't you be working with the architecture instead of against it"

And perhaps look up Eric Evan's chapter on 'Separate Ways' in his DDD book.

Quote: "Integration is always expensive. Sometimes the benefit is small"

All these are non-language specific solutions.

Also you might find this talk about how the BBC integrate their website interesting. - http://www.infoq.com/presentations/web-20-bbc-scaling

Gist: They keep everything separated as much as possible, rarely sending messages between machines in anything other than simple HTTP requests. i.e They avoid remote-SQL queries because they are harder to track and log.

** Evil Character Encoding Issues **

When you start writing your own 'web readers' its worth being aware of character encoding issues too:

Read this article by, Mr Stackoverflow himself, Joel Spolsky:

The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) - http://www.joelonsoftware.com/articles/Unicode.html

** What the users see**

OK - that was about getting the two systems working together over the web. But, if you want one interface, one domain name to act as the 'gateway', then you could choose to make either the ASP server, or the PHP Lamp Server the 'frontend'. This is where it can get complex. I only know about Apache, not MS..so

I run a number of sites that have different IP addresses, hosted on different machines - but the code for all of them sits on one machine. Each of the Satellite Sites simply proxies HTTP requests to my 'Origin Server' and forwards the reposnses back to the user.

This is done using the apache's proxy features. - http://httpd.apache.org/docs/2.0/mod/mod_proxy.html

Quote:

A typical usage of a reverse proxy is to provide Internet users access to a server that is behind a firewall. Reverse proxies can also be used to balance load among several back-end servers, or to provide caching for a slower back-end server. In addition, reverse proxies can be used simply to bring several servers into the same URL space.

Be prepared for headaches - but with dedication its possible to have two servers one domain name.

See: mod rewrite:

Quote:

'proxy|P' (force proxy)

This flag forces the substitution part to be internally sent as a proxy request and immediately (rewrite processing stops here) put through the proxy module. You must make sure that the substitution string is a valid URI (typically starting with http://hostname) which can be handled by the Apache proxy module. If not, you will get an error from the proxy module. Use this flag to achieve a more powerful implementation of the ProxyPass directive, to map remote content into the namespace of the local server.

    Note: mod_proxy must be enabled in order to use this flag.

I, like you, also racked my brains trying to figure this stuff out. The trick is to know the right words.

The following phrases probably more likely to hold the key to your answers

  • network architecture
  • REST
  • gateway
  • proxy
  • syndication
  • XML/RPC
  • SOAP
  • API

...than these phrases:

  • make asp work with php
  • two different web sites
  • etc
JW
just tried searching for the IP address of both the links using this http://www.selfseo.com/find_ip_address_of_a_website.phpIp addresses are diff..one's from Denmark..another BritainWhat does this mean now ? 2 diff websites?
Serenity
You can never be 100% sure. There might be an elaborate proxy set-up leading back to the same machine. However it would be so much effort to do that so highly unlikely. I'd bet they are on different machines.http://www.amazon.co.uk/Sherlock-Holmes-Complete-Collection-DVD/dp/B002EAKWEI
JW
@happysoul most likely - yes. But don't be too anxious - it's all virtual. @JW it is possible *theoretically* but don't be silly - not in this particular case.
Col. Shrapnel
@Shrapnel -Thought I'd be thorough - I think Happy Soul is asking "How is this possible" rather than having "an unhealthy interest in a particular web master's under-ware". @HappySoul....why are you asking? Just out of interest.
JW
@JW read my other questions and you will know..basically trying to figure out how to make asp.net website and php based forum work together..I am completely new to this web development stuff which I guess will be apparent from the questions I have asked
Serenity
@Happy I wouldn't get too hung up on making them work together 'physically on a machine'. Keeping them as separate systems and defining the HTTP interface between them is probably simpler. See OpenID : http://openid.net/developers and look into REST http://www.youtube.com/watch?v=YCcAE2SCQ6k and perhaps look up Eric Evan's chapter on 'Seperate Ways' in his DDD book. All these are non-language specific solutions.
JW
+1  A: 

Literally, forum.blahblah.com is another website, as it's another domain.
If you are asking if it's the same webserver supports it, it's hard to tell for sure. But if you compare IP addresses of these 2 sites and it will be different, you can tell it's 2 different servers.

Col. Shrapnel
+1  A: 

Basically, it's a folder, unless there's a complex setup. PHP and ASP.net can reside on the same server.

There are different scenarios:

  • Everything is normal, the same server serves both. which is highly most likely.
  • "forum.blahblah.com/content" is a directory on forum.blahblah.com, that includes a frame, that frame is on another server. You can easily tell if this is the case viewing the source at "forum.blahblah.com/content".
  • There's a complex setup, involving a proxy, that redirects "forum.blahblah.com/content" traffic to a server, and other `"forum.blahblah.com" traffic to another, you an tell if this is the case by looking at each's http headers.
aularon
Sorry, I answered about `forum.blahblah.com` and `forum.blahblah.com/content`, which is not really the question.
aularon
+1  A: 

It is possible to host sub-domains on completely different servers. So main site (example.com) and sub-domain (forum.example.com) can have different IP addr, and both can run different web-server.

And its also possible for IIS to run PHP sites.

Abhijeet Pathak
A: 

Its not another domain, forum.blahblah.com is a subdomain of blahblah.com. A subdomain is "owned" by it's domain, in some cases it is run by other people (eg webhosting), but blahblah.com would ultimately have control over forum.blahblah.com.

Greg Treleaven
the question is not about "who control". Not to mention it's different domains.
Col. Shrapnel
@Col. Shrapnel: http://aldebaranwebdesign.com/blog/difference-between-domain-subdomain-directory/Read that, then you'll know. And, maybe the question is a bit unclear/confusing..
Greg Treleaven
LOL this guy do not understand this matter as well :)
Col. Shrapnel
again, this question is about a **site**, not DNS record. one who controls domain's DNS record can have no control on the site. They can shut it off and nothing more. And what about TLD owner, who **really** controls them all? ;)
Col. Shrapnel