Web Hosting Forum | Lunarpages


*
Welcome, Guest. Please login or register.
Did you miss your activation email?



Login with username, password and session length
May 25, 2012, 11:01:02 AM

Pages: [1]   Go Down
  Print  
Author Topic: Add-on domains as subdomains access ?  (Read 1096 times)
HazardTW
Intergalactic Cowboy
*****
Offline Offline

Posts: 70


« on: February 03, 2008, 03:17:35 PM »

Not even sure how to title this one.

I have my main account, and I have add-on domains.

The add-on domains are added as subdomains and accessible via:

http://www.<addOnDomainName>.<mainAcctDomainName>.com

AND

http://www.<addOnDomainName>.com

In the file structure of my main acct, the add-on domains are folders in the root main acct folder:

/public_html/<addOnDomainName1>/
/public_html/<addOnDomainName2>/

All pages or scripts in my main acct root dir /public_html/ seem to be able to access any of the add-on domains as if those folders were just a regular part of my main acct domain.

Example:

A web page here:
/public_html/mypage.html

Can use:
'<img src="<addOnDomainName1>/images/animage.jpg">'

To get an image from the add-on domain's image folder.

This access did not extend across add-on domains though, if I have a page or script in:

/public_html/<addOnDomainName1>/

It was not able to access files in:

/public_html/<addOnDomainName2>/

via path:
'../<addOnDomainName2>/images/animage.jpg'

Is it intended behavior that the main account's web pages and scripts treat the add-on domain folders as it's own?


Logged
Mitch
Berserker Poster
*****
Offline Offline

Posts: 12837


WWW
« Reply #1 on: February 04, 2008, 05:50:32 AM »

Just curious, why not use the path:

Code:
http://www.addondomain.com/file.html

Instead of trying to go through the primary domain?
Logged

New to Web Site Hosting? Check Out the Lunarpages Blog Hosting Guide!


Follow us @lunarpages on Twitter!
Important Threads: Read This Before Posting! | Lunarforums Rules! | Mitch's Link of the Day!
Also, be sure to check out and subscribe to the Lunartics Blog and the Lunarpages Newsletter !

Need Web Hosting Help? Check out the Lunarpages Web Hosting Wiki. It has tons of tips, tutorials and resources!
HazardTW
Intergalactic Cowboy
*****
Offline Offline

Posts: 70


« Reply #2 on: February 04, 2008, 07:04:54 PM »

My post was wasn't clear enough Sad

Maybe I can explain it better... 

Example:

mainacct.com

add-on's: (not sub-domains)

addon1.com
addon2.com

A script or page here:
/public_html/addon1/script.php 

Cannot access anything above /addon1/ since that is it's root.

But a page or script in the root of mainacct.com /public_html/ can access files and folders in:
/public_html/addon1/...
/public_html/addon2/...

Since they are subdirectories of it's root.

I like that each of my add-on domains cannot access anything out of their root, but my main account which is a different website entirely, can access the add-on domain's files and folders.

I don't want or plan to have pages in mainacct.com accessing the other domains, but wondering if it was intended that the main account has access to the add-on acct's or is this just an unintended consequence of creating add-on accounts as sub-domains?

It's probably unlikely that I would accidentally link to one of the add-on domains from my main domain, but the possibility is there, and if you guys actually intended that add-on domain folders not be accessible from the main acct root, I wanted to let you know that it is in my acct.

Am I making more sense?  Smile
Logged
Pages: [1]   Go Up
  Print  
 
Jump to: