The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> how to execute subdomain html file, subdomain
hjl1999
post Aug 8 2011, 09:50 PM
Post #1


Newbie
*

Group: Members
Posts: 18
Joined: 19-August 09
Member No.: 9,488



I understand the domain fault home file is index.html

How do I name my file so that it would execute subdomain name?
For example:

www.example.com = my web site home file is index.html

text1.example.com will be my subdomain, what file should I name so that it would be called?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 8 2011, 11:49 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



index.html

The index file is the default file the server fetches when the browser goes to a directory. Nothing more.

Go to http://exmple.com and http://example.com/index.html will be served (if it exists).
Go to http://exmple.com/dir/ and http://example.com/dir/index.html will be served (if it exists).
Go to http://exmple.com/dir/nother_dir/ and http://example.com/dir/nother_dir/index.html will be served (if it exists).
And so on...

A subdomain is typically created through your control panel and pointed to a directory. Could be any directory of your choice if you are lucky, but some CPs force their own file structure and naming conventions. You'll know when you try it.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
hjl1999
post Aug 9 2011, 09:06 AM
Post #3


Newbie
*

Group: Members
Posts: 18
Joined: 19-August 09
Member No.: 9,488



thenk you Pandy,

for example, for mobile page,

m.example.com

what would be the default file for server to fetch?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 9 2011, 10:23 AM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



index.html. smile.gif

Or whatever you configure the server to use. It's like this, there's actually a list of files than can act as index files. Your server could have a list like the below, just as an example.
CODE

index.php,index.shtml,index.html,index.htm

The first file is the first hand choice. If index.php exists, that's what get servered. If it doesn't, the server looks for index.shtml and so on. There's nothing magical with the file name 'index' either. It's just a convention. If you wanted to you could call your index files DonaldDuck.html as long as you tell the server that's what you want, but I wouldn't recommend it. happy.gif

I think we maybe don't understand each other. Please explain what you are trying to do, create a subdomain or put an index file in its main directory? Something else? What is it that doesn't work for you?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
hjl1999
post Aug 9 2011, 10:33 AM
Post #5


Newbie
*

Group: Members
Posts: 18
Joined: 19-August 09
Member No.: 9,488



Thank you Pendy, allow me to make myself clear.

let say I have a domain name web page www.example.com and my default landing page in my server is index.html.

so, I want to creat a landing page mobile browser and the subdomain name is m.example.com
what is this landing page for the subdomainn name should be?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Darin McGrew
post Aug 9 2011, 11:28 AM
Post #6


WDG Member
********

Group: Root Admin
Posts: 8,365
Joined: 4-August 06
From: Mountain View, CA
Member No.: 3



The mobile sites I'm familiar with don't really fetch files. For that matter, neither do the corresponding non-mobile versions of the sites. They're database-driven, so both the mobile and non-mobile sites use the same data, they just produce different HTML (and/or CSS, JavaScript, etc.) when they send the results to browsers.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 9 2011, 12:35 PM
Post #7


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Bit if you are are going to have a subdomain called m.example.com you need to set that subdomain up in your Control Panel. And the index file would be called index.xxx, same as all other index files you have.

We are still not on the same line, me thinks. smile.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
hjl1999
post Aug 10 2011, 02:44 PM
Post #8


Newbie
*

Group: Members
Posts: 18
Joined: 19-August 09
Member No.: 9,488



OK, you are saying I have to set this subdomain link at Control Panel. I have to ask about this from another department. So they can talk to host service provider. Correct?

We already have index.html in our web site. This is the landing page of our web site (ie: www.example.com)

still do not know what program m.example.com landing page is?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 10 2011, 03:27 PM
Post #9


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



QUOTE(hjl1999 @ Aug 10 2011, 09:44 PM) *

OK, you are saying I have to set this subdomain link at Control Panel. I have to ask about this from another department. So they can talk to host service provider. Correct?

Using the CP is what you typically do and you can do it yourself. How are you hosted? Free host? Paid host? Do you have a Control Panel? Does your account come with the ability to create subdomains?

QUOTE
We already have index.html in our web site. This is the landing page of our web site (ie: www.example.com)

Every folder can have an index file.

http://htmlhelp.com has one => http://htmlhelp.com/index.html
http://htmlhelp.com/tools/validator/ has one => http://htmlhelp.com/tools/validator/index.html
http://forums.htmlhelp.com has one => http://forums.htmlhelp.com/index.php

As you can see above you get the same file either you use the index.*** part of the URL or not. The index file is the file that is server by default when you go to a directory. If it wasn't there you would see a file listing of all the files in that directory or be denied access.

Furthermore, a subdomain in most ways acts as a "real" domain. It's not just another directory. You can, for instance, not use relative urls to link to it from your main domain or vice versa. If you want to link from a html file on http://forums.htmlhelp.com to another file on http://htmlhelp.com you need to use the full URL.

QUOTE
still do not know what program m.example.com landing page is?


I just used example.com as an example domain. That's actually what example.com is for - so you can use its URL in examples instead of making something up that may exist.

I'm sorry. I know we still aren't on the same line, but I don't know how to explain it better. sad.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Aug 11 2011, 06:00 AM
Post #10


.
********

Group: WDG Moderators
Posts: 9,649
Joined: 10-August 06
Member No.: 7



QUOTE(pandy @ Aug 10 2011, 10:27 PM) *

Does your account come with the ability to create subdomains?

Sometimes the web host charges extra for setting up subdomains.

QUOTE
Furthermore, a subdomain in most ways acts as a "real" domain. It's not just another directory.

At least when it comes to URLs in e.g. web pages. But when you upload files with FTP, doesn't it differ between web hosts if you must login to a different account (like subdomain.yoursite.com) and put the files in its web root, or use the same account but put the subdomain files in a separate subdomain directory (like public_html/subdomain)?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 11 2011, 06:43 AM
Post #11


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



Never encountered that. On the server everything is just directories IME.

I have encountered a CP that was very bothersome with domains though, but not subs, I think.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
PQuen
post Mar 27 2014, 10:54 AM
Post #12





Group: Members
Posts: 1
Joined: 27-March 14
Member No.: 20,623



I have a website created with a certain theme. Then I created a subdomain but created a completely different theme for this page.

On my domain I have these settings: "example.com" and the path set to "public_html" When I created the subdomain "templates.example.com" it gave me the document root: "/public_html/templates"

Keep in mind I created a new web theme to publish to the subdomain, but still using the same "pictures" "heading titles" "footer" "site logo". The files all seem to be there in my file manager. But when I try to bring up "templates.example.com" my theme pkg is missing. I only see my text, titles, pics, logo and such, but no theme content. Am I missing something?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Pallavi
post Sep 25 2015, 02:05 AM
Post #13





Group: Members
Posts: 1
Joined: 25-September 15
Member No.: 23,573



Hello, My problem is same as PQuen. I created a subdomain using cpanel with root directory public_html/subdomainame. I uploaded index.html and all supporting files in this folder. when i typed subdomain webaddress in browser, i see 'Index of/ and list of all uploaded files that are hyperlinked" . when i click on index link here, i can see my webmap on index. but when i type subdomain address, its confusing for someone not knowing that webmap will be placed on index. i want to open webmap directly as i type the subdomain address. Is there a solution please help?
I am very new in web designing. I was promised help from my service provider when i had purchased but now not getting any support to fix my problem.
Regards
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Sep 25 2015, 03:45 AM
Post #14


.
********

Group: WDG Moderators
Posts: 9,649
Joined: 10-August 06
Member No.: 7



QUOTE(Pallavi @ Sep 25 2015, 09:05 AM) *

Hello, My problem is same as PQuen. I created a subdomain using cpanel with root directory public_html/subdomainame. I uploaded index.html and all supporting files in this folder. when i typed subdomain webaddress in browser, i see 'Index of/ and list of all uploaded files that are hyperlinked" . when i click on index link here, i can see my webmap on index. but when i type subdomain address, its confusing for someone not knowing that webmap will be placed on index. i want to open webmap directly as i type the subdomain address. Is there a solution please help?
I am very new in web designing. I was promised help from my service provider when i had purchased but now not getting any support to fix my problem.
Regards

Sounds like your server doesn't specify a directory default page for your subdomain. On the Apache server this can be done in e.g. a .htaccess file, or maybe through your webhost's control panel.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Sam A
post Oct 21 2015, 01:06 AM
Post #15


Novice
**

Group: Members
Posts: 26
Joined: 22-April 15
Member No.: 22,515



You can add just slash before the name of page. you can not execute it directly because it is sub domain.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 16th April 2024 - 12:07 PM