You are invited to Log in or Register a free Frihost Account!

Virtual directories? I have a need

OK, I've rolled a couple versions of my site out, and with the new header/footer changes I'm seeing a need for a couple virtual directories for my site. I will explain.

All my files are in /public_html/
My header and footer files are in /public_html/templates/

My domain is
I've created - subdomain
and - subdomain
they are located in the following directories and the header and footer files must be in a templates directory just below them
for example...
/public_html/web/templates/ - directory structure without virtual dir
/public_html/outer/templates/ - directory stucture without virtual dir

I really want to be able to set the following directories as virtual directories pointing at the /public_html/templates/ directory so I don't have to copy header/footer files over and over for every subdomain that I add.
/public_html/web/templates/ - points to /public_html/templates/
/public_html/outer/templates/ - points to /public_html/templates/

How do I do this? I've looked all over my direct admin console, and in my ftp program to see if it allowed me to add virtual directories, but I can't find this anywhere.

Can someone help me save time and site bugs by telling me how this can be done? Please contact me back and help me work this out because it's getting to the point of saving me a lot of time, headaches, and webspace for every time I would otherwise have to duplicate these files for each sub domain in opporation on my site.

I rather think that you are trying to make it much more complicated than it should be.

What I think you want to do is include a footer and a header with SSI to every page.

Take this code in one of your subdomains:
<!--#Include Virtual="/templates/header_a.ssi"-->

And now instead of going up one directory to /public_html/subdomain/templates/, you change it to go down one directory, to public_html/templates/ .
<!--#Include Virtual="../templates/header_a.ssi"-->

With "../" you go up in the directory structure with one level, "../../" would mean 2 directories up.

I hope this helps.
You know, I tried that, but I made a mistake in thinking just "/" would start at the root directory. I didn't include the ".." so now I will. HAHA

Thanks bondings, you rule!

(Super Bondings to the resque! Gogo Gadget... Keyboard! lol)
Related topics
Creating a new Operating System
Password Protecting Directories?
EasyJet Virtual
Fix for deleting files/directories owned by apache
Virtual Skipper 4 Demo
Memory problem!
Best FTP Client on EARTH
Immersive Virtual Reality
Best Freeware
[php] including from lib folder impossible
GDrive; Google's Virtual Hard Drive
PHP paths and IIS virtual directories
Password Protected Directories
Virtual Host in Apache
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

© 2005-2011 Frihost, forums powered by phpBB.