Hello everyone, Im compleatly stuck on how i can do this. I have a domain which i offer free web hosting on (subdomain hosting) and i want to display a small advert on each page that is on the domain. Ether by using a fram, displaying a div, so it shows on every single page of the domain. Any ideas? Tom
If you're using Apache, there's the htaccess mod rewrite module that allows you to prepend html codes into pages.
Thanks Weizheng i looked into that and i found that onyl modified php files, so after looking into it alot more i managed to get this working: you need to add the following to the htaccess file for adverts at top: AddHandler application/x-httpd-php .htm .html php_value auto_prepend_file "advert.php" for adverts at bottom: AddHandler application/x-httpd-php .htm .html php_value auto_append_file "advert.php" and has AllowOverride All set in the httpd.conf then you need to create the file your prepending. The effect is www.one9.co.uk & http://tehpa1n.one9.co.uk or if you want it to show on a subdomain without having all the files in there, use the following in the subdomains htaccess file: AddHandler application/x-httpd-php .htm .html php_value auto_append_file "/home/accountname/public_html/advert.php" I then used the cpanel skeleton file to add this to all new accounts Hope that helps someone else out who is looking to do the same