Hello,
I want to start a small free hosting site, with ads. I've tried almost 4 hours to make the ads work through mod_layout or mod_rewrite. There were a few threads about this, but they couldn't help me enough.
With mod_rewrite I made the footer, but it didn't work with PHP files. Only with HTML. Here's the code I used:
.htaccess
Code:
RewriteEngine On
RewriteRule ^(.*)\.html$ /footer.php
footer.php
Code:
<?
$filename=$DOCUMENT_ROOT.$REQUEST_URI;
$handle = fopen ($filename, "r");
$contents = fread ($handle, filesize ($filename));
fclose ($handle);
echo $contents;
echo "<DIV ALIGN='CENTER'><IMG SRC=http://www.maxterhost.com/templates/rk_business/images/rkbusiness_r1_c1.jpg></DIV>";
?>
I tried to change
RewriteRule ^(.*)\.html$ /footer.php to
RewriteRule ^(.*)\.*$ /footer.php so I can make it work with all files, but I got always Error 500 - Internal Server Error.
How can I make this work with PHP and HTML files? And how can I make it appear at the top of the page?
Any help would be appreciated.
Please note that I have a reseller account. mod_layout and mod_rewrite are installed.
Thank you.