Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
June 30, 2008 - Submit Your Site for the July 08 Site of the Month Award!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 24, 2008, 01:28:13 PM


Login with username, password and session length


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

Posts: 60


« 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
Lunarpages Traffic Cop
Senior Moderator
Berserker Poster
*****
Online Online

Posts: 6942



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

HazardTW
Intergalactic Cowboy
*****
Offline Offline

Posts: 60


« 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:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM