Re: why does PHP parse "*.html" files in one subdir/ but not in another?
| From: | Adam Shannon | Date: | Sun, 19 Jul 2009 01:34:57 +0000 |
| Subject: | Re: why does PHP parse "*.html" files in one subdir/ but not in another? | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-295554@lists.php.net to get a copy of this message | ||
On Sat, Jul 18, 2009 at 7:54 PM, Govinda <govinda.webdnatalk@gmail.com>wrote:
>
> On Jul 18, 2009, at 6:36 PM, Adam Shannon wrote:
>
>
>
> On Sat, Jul 18, 2009 at 7:01 PM, Govinda <govinda.webdnatalk@gmail.com>wrote:
>
>> Hi all,
>>
>> ..sitting here thinking this is so easy, and I must have been over this
>> already in the past.. but it is eluding me just now..
>>
>> I can't figure out why files with the .html extension ARE being parsed by
>> PHP when they are in the main doc root dir/, or in one subdirectory down
>> from there.. BUT NOT when in *another* new subdirectory that I just
>> created. Both subdirectories have the exact same perms (same owner & group
>> too), both have the same php.ini file in them,... neither have an .htaccess
>> file in them.. (if that would matter?).
>>
>> Anyway I just need to get PHP tp process all .html files in this and in
>> any new subdirectory(ies) that I will make.
>> Can someone point me to what I need to pay attention to?
>>
>
> It sounds like your .htaccess file may be telling .html files in a
> /sub/directory/ to treat .html files as .php
>
> Just add this to your root .htaccess
> AddType x-mapp-php5 .html
>
>
> Thanks Adam. But still no luck. I did add that line to the .htaccess file
> in my doc root, but my file.html in subdir/ is still not being parsed by
> PHP.
> ??
>
Try to put that same line of .htaccess into the sub directory. Your host
may not allow .htaccess rules to be many directories deep.
>
> -G
>
--
- Adam Shannon ( http://ashannon.us )