Branching


#1

I’ve seen a similar topic on this forum, but I don’t want to hijack it so here’s my question.

Currently I have created 2 subdomain, and a maindomain for my website. In the filestructur it currently works as this:

username/images
username/www
username/forums
username/css
username/admin

whereas www is the mainsite and forums + admin my subdomains.

now I’ve placed all the common CSS and Images in seperate directories, but I can’t access them from the other directies. like for example, my index.html has a CSS linked with …/css/common.css but it’s not working.

Is this a security setting, or am I doing something completly wrong?

p.s: I hope it’s clear what I’m trying to do…


#2

Can you show us an example url where it is not working as expected (so we can see the code you are using)?

–rlparker


#3

Sure.

if you browse to http://www.florensiahq.com you will see the index.html page thats located in the www folder (see first topic).

The css folder is beeing linked from the head of the index.htm l page. But the browser doesn’t find it.


#4

Ah! A relative link can only be used when linking within a website; when the destination anchor is under the same domain name. :wink:

The information on this page might help you.

You can get around this issues using PHP instead of .html and use PHP functions (include, require, etc.).

–rlparker


#5

aaaaah right :slight_smile:

Just one thing, for the CSS, I would probably have to include it then and make it inline, cause I don’t know how else I’d ork it out then.


#6

That’s how I would probably do it. BTW, I just reread this thread and realized that I had somehow forgotten to include the link I intended when I said, "this page might help you out … sorry about that!

Anyway, here is the page I meant to point you to:

http://www.motive.co.nz/glossary/linking.php

–rlparker


#7

What do people think about using symbolic links to have a the shared directories (across sites) be able to reference common html and css?

Another option for those who are into source control is to use SVN and deploy the common code as a dependent/included project in each of the different sites. That way, when the project associated with each site is deployed, the dependent project can be included.

Use the [color=#CC0000]3DOM50[/color] promo code for 3 extra lifetime domains and $50 off
More Dreamhost coupons here!