Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Keeping files seperate to virtual domain path

Status
Not open for further replies.

DrDan1

Technical User
Oct 2, 2002
127
GB
Maybe I'm over complicating things here, but here goes.

I'd like to have a system where a user can have theri own website by selecting a website template.

Lets say a user select template1 stored at:
\htdocs\templates\template1\

He will also need to be able to store his own files, such as images, for example, his logo. Is there a way that Apache can pull files from a seperate location but for the same domain?

Lets say his images are stored at:
\htdocs\clients\client1\images\

I can't have the images stored in a subfolder of the template directory as the user may decide to change to a different template.

It needs to be so that when a browser looks at an image, it will appear as
I'm using Apache2.2 and PHP 5. Maybe I'm going about this completely the wrong way and there is a much simpler solution.

Thanks,
Dan

----------------------------------------
Knowing is not enough, we must apply. Willing is not enough, we must do.
--Bruce Lee
 
Ah! Never mind. I just found out about Alias! It does exactly what I need. Well, almost. If anybody knows of a way to generate a dynamic Alias path, then please let me know.

For example user1 will have an images folder that points to:
htdocs\shared\user1\images

And user 2 would have one that points to
htdocs\shared\user2\images

Something similar to mod_vhost_dbd, which I'm using for dynamic virtual hosts according to what I have in my database, but for aliases instead.

Cheers,
Dan

----------------------------------------
Knowing is not enough, we must apply. Willing is not enough, we must do.
--Bruce Lee
 
I've managed to more or less do what I wa intending using mod rewrite, however of course this doesn't remove the actual variable folder that contains the "userX."

I was wondering if there was an Alias equivilent to vhost_dbd out there, but scouring the net, there doesn't seem to be. Pity.

----------------------------------------
Knowing is not enough, we must apply. Willing is not enough, we must do.
--Bruce Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top