Forum Moderators: phranque
Here is the htaccess file:
<FilesMatch "\.html$">
# set the prepend file setting
php_value auto_prepend_file "learn.php"
</FilesMatch>
I have a learn.php which has hi and when i run an html file, it doesn't prepend anything (not sure why)...
Any idea?
Thanks!
What does learn.php include? You said it has hi, but what does that mean, exactly? Is it doing a php echo of the word 'hi'? Do you have html files set to be parsed for php?
Do you get any error messages? Do you have display_errors turned on?
What happens if you remove the <FilesMatch> container and just put the auto_prepend line in there?
Is your .htaccess (not htaccess) file named correctly, and is it being parsed? (IOW, is AllowOverrides enables, and do other directives in .htaccess work?)
The file is correctly placed (learn.php) and it should be able to access it. Inside the file it uses php echo to print out hi.
It still doesn't work when i remove the files thing at the top and bottom.
What is AllowOverrides? I dont think the server may be configured properly. Can you explain what i need to configure properly.
Thanks!