Reply to topic
More About SubDomains
jabudhi


Joined: 04 Nov 2006
Posts: 3
Reply with quote
I feel very ignorant. Sorry if somebody touched on this question already, but I have been banging my head against the wall for a couple of days.

I have gone into my DNS administration (Advanced) and created a "blog" CNAME (Alias) to set up a pseudo sub-domain. Now I type in blog.chartandcompass.org and I get a certain webpage that comes up for hostmysite that has options about control panel login, etc. It also says on the top of the page:

"This space is reserved for: testlinuxstarter1.org"

I know that something has been done right because that page doesn't just show up for any wrong subdomain. There are several scripts online that have redirect attributes, but I don't know which ones pertain to what I want to do (blog.chartandcompass.org). Anyway, I am wondering - can anyone tell me in reasonable detail how and where to set up my subdomain information. Do I add something to the top of my "index.html" file, Do I add a new file, Do I mess with the cgi-bin? Like I said, I am ignorant and feel very frustrated right now.

Thanks for your help in advance!!
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 547
Location: Harrisburg, PA
Reply with quote
Hello.

Not sure why you are getting that info. Be sure you have the CNAME record pointing to the correct IP address of your website. Make sure the ip of the "Host" and the CNAME match on the DNS administration screen.

You can't physically host two websites on one account. It it against HMS's policy However, you can as you said use a redirect script to do so. (Which is not against policy)

You're not going to be able to do a proper redirect to host multiple sites with standard HTML. It's just not possible. But you can do it with ASP OR ColdFusion.

If you don't know Coldfusion at least a little, you might not understand the code below, but I'll post it anyways.

At the top of your Application.cfm or Application.cfc in the root of your site.

Code:
Code:

<cfswitch expression="#CGI.Server_Name#">
      <cfcase value="domain1.com,www.domain1.com" delimiters=",">
         <cfinclude template="/domain1/#cgi.script_name#">
         <cfabort>
      </cfcase>
       <cfcase value="domain2.com,www.domain2.com delimiters=",">
         <cfinclude template="/domain2/#cgi.script_name#">
         <cfabort>
      </cfcase>
      <cfdefaultcase>
      </cfdefaultcase>
   </cfswitch>


What type of hosting account do you have? (Linux Builder, Windows?...)

If I confused you about something, please let me know and I'll try to clear it up. Smile
Connie


Joined: 26 Mar 2005
Posts: 176
Location: The Internet
Reply with quote
Hi jabudhi

You are using the one name based hosting plans, which is why the subdomain does not properly go back to your own site (the IP is shared). However, it has now been added as an alias on the server so that blog.chartandcompass.org resolves to your site. If you want it to go somewhere else, you'll want to do like Jason said and use a redirect script.
thanks
jabudhi


Joined: 04 Nov 2006
Posts: 3
Reply with quote
Thanks for the prompt reply from both of you - I am definitely thankful that people are willing to help.

So - I physically make a file named "application.cfm" or "application.cfc" and cut and paste the information that you posted in that file and then upload to my root directory? Like I said - right now my brain is mush. I practically feel like I need someone to baby me step-by-step. If it's not too much trouble, can you please tell me the parameters that i need to personalize in that coldfusion script? Thanks a ton for all of your help and unfallable patience.

My account is a Linux account, by the way.

Thanks again!
One More Thing . . .
jabudhi


Joined: 04 Nov 2006
Posts: 3
Reply with quote
Connie - how did you change the setting to have the blog.chartandcompass.org to direct to my site? How do I do it for other aliases??

Thanks
Jeff
Shaji


Joined: 21 Feb 2005
Posts: 83
Reply with quote
jabudhi,

It actually add server alias in Apache configuration but you do not have access this configuration. Just request support department to do that for you.
More About SubDomains
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic