Jump to content

Recommended Posts

Posted

I just created a new site and uploaded some files. I have three problems here:

 

1. The "temporary" access, http://xx.xx.xx.xx/~userid uses a different root directory than the final site http://www.mysite.com. The result here is includes based on the root directory (i.e. #include virtual="/file.html") fail. While this would undoutably be fixed once I change the domain name over, I need to test the site first. This makes it impossible to test.

 

2. Subdomains are placed in a subdirectory on the root site. i.e. "mysub.****" is placed in the "mysub" directory. It means the subdomain could also be accessed as /mydomain/mysub, causing additional problems with included files (and other things). I would much rather have it in a separate directory below the main site root (www) so it can only be access via the subdomain. (It also makes for much easier maintenance).

 

3. A minor point - some hosts allow you to reconfigure so that .html files are also processed as server-side files. As all my files include things like headers and footers, I would much rather be able to use .html extensions.

 

Does anyone have any suggestions on these things? TIA.

 

Jerry

Posted

;) Welcome to the family, jstuckle! :dance:

 

1. Please view this post for an idea of what you can do to test prior to domain propagation.

 

2. When you create a subdomain the folder is created in the public_html folder which is your main site folder.

 

3. I think can be done modifying the .htaccess file but I don't know what you would need to add. Someone else correct me if I am wrong on this.

 

Glad you found your new home!

Posted

:dance: Welcome to the family, jstuckle! :dance:

 

As to adding to the .htaccess file for server side includes like php

see Apache Handlers and parsing html files for php commands.

 

I have my htm, html and shtml files parsed for php.

 

I believe with php includes you can use DOCUMENT_ROOT to include regardless of the method used to access the site.

AS in

<?php

include $_SERVER['DOCUMENT_ROOT']."/inc/header.php";

?>

 

hope this helps

Posted

Hi, Bruce & Don, and thanks for the speedy response.

 

1. Ah yes, I hadn't thought about changing my HOSTS file. I haven't had to play with that for quite a while - and it just didn't occur to me :dance: . But it's working now. Thanks.

 

2. This is a MAJOR stumbling block. I'm currently working on a site which could have 30+ subdomains - each with their own webmaster, in addition to the main domain. The main domain has > 250 static pages (and > 1000 dynamically generated pages) whose content is maintained by non-technical people. The folks maintaining the content of the main domain should not have to worry about additional subdirectories for the subdomains.

 

Their current host has things set up so that the subdomains are added below the main domain's root, i.e. the directory structure might be:

 

/home/user/domain.com Main domain directory

/home/user/subdomain1.domain.com First subdomain directory

/home/user/subdomain2.domain.com Next subdomain directory

 

This makes it very easy to set up the ftp access to only the base domain or appropriate subdomain.

 

(Sorry - I've been working with PC's since DOS 1.0. They're still directories - not folders :D

 

3. Thanks - I found it on cpanel. As I said - it wasn't a major problem at the time, and I hadn't looked into it much yet. I wouldn't have even posted here if it were just that problem - :) . But it's working now.

 

Again, thanks. I like the options available here, and the price can't be beat. Unforttunately, the subdomain problem may still be a deal killer.

 

Jerry (sorry - forgot to sign my last one).

 

P.S. - Bruce - reference your tag line. I disagree that there are no dumb questions. I've been teaching programming (Fortune 1000 companies) for the last 13 years. In that time, I've heard one dumb question:

 

"Do you believe there is no such thing as a dumb question?".

 

But there are no other ones! :dance:

Posted
Their current host has things set up so that the subdomains are added below the main domain's root, i.e. the directory structure might be:

 

/home/user/domain.com Main domain directory

/home/user/subdomain1.domain.com First subdomain directory

/home/user/subdomain2.domain.com Next subdomain directory

 

This makes it very easy to set up the ftp access to only the base domain or appropriate subdomain.

When you create FTP accounts, if you name it the same as the subdomain, it will only give access to that subdomain.

 

So...

 

www.******: public_html/

subdomain1.******: public_html/subdomain1/

 

If you create an FTP account called "subdomain1", the user would login as "subdomain1@******" and "public_html/subdomain1/" would be the top most directory of their FTP session.

 

I don't really have a solution for your topmost domain though. The structure of how the domain directories are laid out, though, is not a TCH design. That's the way cPanel creates them, the control panel used to manage everything. Any site running cPanel will have the directories laid out the same. I'm not sure how the other control panels lay the directories out.

 

Hope that helps some anyway.

 

I'm going to move this to a more appropriate forum as well.

Posted

Mike,

 

Thanks for your reply.

 

Unfortunately, this will not work and I'll have to cancel the account.

 

It's a shame, actually. I got an inexpensive account on a monthly basis to do some testing. The final site would require many more resources, and eventually could require several dedicated servers.

 

Thanks anyway, I'll clean up the files and databases and cancel the account.

 

Jerry

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...