adding a standard footer to all webpages in a certain hosting account

TheBear

Verified User
Joined
Apr 16, 2004
Messages
78
Hello,

I provide free hosting to some organizations and in exchange they are supposed to put a link to my hosting site at the bottom of each page on the site. Unfortunately a few have not been doing so.

I want to do something where the link is added to the bottom of each page on their site automatically such that they can not remove it or forget to do so.

Any ideas on how to do this?

Thanks!

Dale
 
Actually yes...

If you own the server yourself you can create a default index.html file, and give it root ownership so the user can't change it. That default index.html file can have a series of frames in it, including one that loads the main index page as index.htm.

Then tell the user to always upload is/her own main file as index.htm.

If the user tries index.html s/he will get an error, and if s/he tries anything else (index.php, etc.) it will upload but it won't appear automatically.

While html programers can get around that, most aren't good enough at html to figure out how.

Jeff
 
There's a couple of apache modules around that will let you add a header/footer... I've used this in the past:

http://tangent.org/index.pl?lastnode_id=478&node_id=362

You may have mixed results depending on the type of page you're trying to include into... for static html this should work fine.

Alternately, you can get into the voodoo of mod_rewrite and process all pages that are served through a wrapper that determines if it's a page that should have the html appended...
 
Hello,

Thanks for the suggestions. I am just looking to add a link to the bottom of each page of certain sites that says something like:


hosting provided by www.domain.tld


where the www.domain.tld is a link to my main hosting homepage.

I was hoing it could be done without a lot of pain :)
 
Mod_layout does a pretty good job of adding the footer to most html, cgi and some PHP pages. However in the past I have it disabled for PHP pages and simply use something like the following into an htaccess file.

php_value auto_append_file /var/www/html/footer.html

/var/www/html/footer.html would be the same html you include with mod_layout for static pages.

I have found that some people will try to outsmart this by overiding with a .htaccess file in their web directory, so in the apache config file you can change the .htaccess to some other name like .myhtaccess and then in / create a .myhtaccess file with the above line in it. The will then have a hard time trying to override that.
 
Back
Top