Forum Moderators: phranque

Message Too Old, No Replies

howto force user pages into a frame

The main idea

         

zagonm

10:23 am on May 10, 2006 (gmt 0)



Hi

First sorry for my poor english, usually I try to search for solutions alone (no forum posts, just reading the manuals... ), but now I feel lost.

So the situation :
- free web hosting
- every user can upload php/html/anything via ftp, can use mysql...
- users webspace needs to be accessable username.domain.hu and domain.hu/username
and the main problem :
- we need to force every site into a framset to show a banner (optionally we can disable this for any user)

I have read a lot... realy tried to figure out something, but I haven't find a good solution yet.

If i'm not wrong I will need to redirect every url request to a "controller" php, which will decide if we must force the frame or not. Now I'm trying to do this with mod_vhost_alias (ServerAlias *.domain.hu), but at this point I don't know how to put the requested user site into the frame.
I have the strange feeling, i need to use mod_rewrite, and with that redirect the requests to this "controller" php. I've seen lot of examples for this, but again can't force page's into a frameset.

To make it clearer (omfg, i need to use english more...) :
if someone request page123.php from userXY.domain.hu or domain.hu/userXY (so the full url is userXY.domain.hu/page123.php or domain.hu/userXY/page123.php) i want to show html like this :


<HTML>
<HEAD>
<TITLE>$TitleOfThePage</TITLE>
</HEAD>
<frameset rows="70,0,*" border="0" frameborder="0" framespacing="0">
<frame name="advertframe" src="$BannerSRC" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize>
<frame src="$AuditCodeSRC" marginheight="0" marginwidth="0" noresize name="audit" scrolling="no">
<frame name="userframe" src="page123.php" marginwidth="0" marginheight="0" scrolling="auto" frameborder="0" noresize>
</frameset>
</HTML>

And somehow prevent to force more than one frame... :)

Thanks for reading, and maybe helping! :)