Jump to content

Recommended Posts

Posted

I have a site www.mysite.com.

I have 3 subdomains sub1.mysite.com, sub2.mysite.com and sub3.mysite.com.

sub3.mysite.com is password protected.

All pages end with .php (ie index.php)

I use the following code:

 

<?php

include("inc23.inc");

?>

 

I find that I will require some of the same includes in more than one subdomain.

Can I do the following?

 

1) Create a subdomain called resources.mysit.com with 3 folders - images, includes and stylesheets

and use

A.

<?php

include("resources.mysit.com/includes/ inc23.inc");

?>

B.

<link rel="stylesheet" type="text/css" href="resources.mysit.com/stylesheets/stylesheetraw.css" /> Instead of

<link rel="stylesheet" type="text/css" href="stylesheetraw.css" />

C.

In my style sheet use

#toparea {background-image: url(resources.mysit.com/images/images/gs1.gif); etc instead of

#toparea {background-image: url(images/gs1.gif);

D

do I use http://

Since I have an absolute address instead of a relative one, I assume it doesn't matter what's where

E

Does the fact that one of my subdomains is password protected complicate anything?

 

Thank you

Posted

I don't think you can do that, as far as I know our php config doesn't allow for calling URLs in includes.

 

I can't really think of anyway to do this other than using a full path - /home/username/public_html/resources/images... etc

 

I think that would work, anyway.

Posted
I don't think you can do that, as far as I know our php config doesn't allow for calling URLs in includes.

 

I can't really think of anyway to do this other than using a full path - /home/username/public_html/resources/images... etc

 

I think that would work, anyway.

 

Would the fact that one of the subdomains is password protected affect that subdomains ability to access another sub domain or the other subdomain to send to a password protected calling subdomain?

Posted

Answering your questions in reverse order... :dance:

 

E - I don't think so. Unless you try to access something via http://subdomain.domain.com

 

D - If you want to use the absolute URL then you must use the http://

 

C - That would work but you'll need to use http:// in the beggining of the URL (see D)

 

B - Same as C

 

A - Ah, the complicated one, finally: No. :dance:

Seriously, this is the most complex one to answer. :dance:

Read my post about why using include("http://somedomain.com/include.php") will not work.

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...