View Full Version : Attaching adds on sites server by Apache
Leszek
24th July 2007, 20:47
Hi!
Many if not the most of hosting companies which offer free webhosting attach their own adds and commercials to sites made by their users.
I'm very curious about how could this be done with Apache and hopefully ISPConfig.
I've heard about a module that can do this but couldn't find any information about it on the net.
If anyone knows some good ways to do this,I'd be very grateful.
edge
24th July 2007, 21:34
have a look here.
http://www.howtoforge.com/forums/showthread.php?t=12046
Leszek
18th August 2007, 10:41
It doesn't seem to work for me.
Where should add.php be ?
edge
18th August 2007, 12:11
It doesn't seem to work for me.
Where should add.php be ?
You will need to create it.
It should be some php code that "randomly" loads your ads.
Leszek
18th August 2007, 12:16
You will need to create it.
It should be some php code that "randomly" loads your ads.
Yes,that's pretty obvious but where should I put add.php ?
Can I write the location of add.php somehow ?
falko
19th August 2007, 14:50
If you use it like this: RewriteRule ^(.*) /add.php
then add.php must be in the top folder of the web site (the document root). Of course, you can modify the rewrite rule if you want to put add.php in a subfolder.
Leszek
19th August 2007, 15:16
If you use it like this: RewriteRule ^(.*) /add.php
then add.php must be in the top folder of the web site (the document root). Of course, you can modify the rewrite rule if you want to put add.php in a subfolder.
So in that case a user would have to have add.php in he's top website folder and simply delete it to get rid of the adds.
The only way to stop users from doing this is to set another owner and permissions for add.php.But wouldn't that stop it from being executed?
falko
20th August 2007, 19:31
But wouldn't that stop it from being executed?No, as long as the Apache user can read it.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.