Forum Moderators: phranque
AddType application/x-httpd-php .htm .html <FilesMatch "\.(html?)$"> php_value short_open_tag "Off" php_value auto_append_file "/the/path/that/leads/to/count.php" </FilesMatch>
The idea was to creat the count.php file, upload it and point the .htaccess file to it and it would 'copy' the php code to all the .html files and that in conjunction with the AddType line to parse .html files it would allow the .htm and .html files to work with the .php counter.
Okay, now that Ive told you probably what you figured out by just looking at the code, on to the issue. When I upload the .htaccess file, my site is no longer accessable and I get the Internal Server Error message.
I know what the full server path is and Ive used that and still get the same thing. So my next assumption was that maybe it was a syntax error or something but I dont know enough yet about the code used to be certain. I went to the website that made the program and they have fourms there and found nothing. I contacted the programmer and have recieved no response and thats fine Im sure they get bombarded with requests for help.
So I came here to see if I can find some direction or help. If I include only the AddType I get no error. So to try and troubleshoot some more I added a simple ErrorDocument line:
ErrorDocument code 404 /path/to/404.html
I type in an address I know doesnt exist on the site and oddly it doesnt send me to the error page. The host is using Apache 1.3.33 so its fairly current.
I printed out a guide on using the .htaccess file but havent found anything to clue me in yet as to the trouble. So having done what thought might work and still with the same issue I hope that someone here can help out.
I appreciate in advance any assistance.
AddType application/x-httpd-php .htm .html
ErrorDocument 404 /path/to/404.html<FilesMatch "\.(html?)$">
php_value short_open_tag "Off"
php_value auto_append_file "/the/path/that/leads/to/count.php"
</FilesMatch>
Next, the error document isnt working. Im new (obviously) to .htaccess files so Im pretty much cuttin'-n-pastin' here but trying to read over and learn too. I can pull it up if I type the address to it directly in the browser so its web accessable. So Im not sure whats going on there.
AddType application/x-httpd-php .htm .html
AddHandler server-parsed .htm .html (<---didnt know if I would need this or not)
<FilesMatch "\.(html?)$">
php_value short_open_tag "Off"
php_value auto_append_file "/path/to/my/file/count.php"
</FilesMatch>
ErrorDocument 404 /path/to/my/error pages/ErrorPages/404.html
Here is the link to the instructions for the counter in case Im missing something. Im at a loss for why this wont work but I would appreciate any assistance. Thanks.
[scriptsearch.com...]