Forum Moderators: phranque

Message Too Old, No Replies

Problems with ForceType in .htaccess file

Getting a file not found error

         

mista_phi

10:11 pm on Sep 21, 2004 (gmt 0)

10+ Year Member



The following is my original .htaccess code:

------------------------------------------

# -FrontPage-

IndexIgnore .htaccess */.?* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName www.online-music-directory.com
AuthUserFile /home/dmoore2/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/dmoore2/public_html/_vti_pvt/service.grp

------------------------------------

I added the following code to the bottom of the .htaccess file:

<Files test_file>
ForceType application/x-httpd-php
</Files>

When I link to the url [mysite.com...]
I get a page not found error. My server's error log lists the following:

Premature end of script headers: /home/dmoore2/public_html/test_file

Does anyone know what my problem could be?

Thanks

isitreal

11:25 pm on Sep 21, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



see if this thread [webmasterworld.com] helps.

Try adding this line to your .htaccess file if you have this problem.

<Files filename>
AcceptPathInfo On
</Files>

mista_phi

11:47 pm on Sep 21, 2004 (gmt 0)

10+ Year Member



How should I add this? I've tried adding the whole script:

<Files test_file>
AcceptPathInfo On
</Files>

I've tried adding "AcceptPathInfo On" inside of the current files script:

<Files filename>
AcceptPathInfo On
ForceType application/x-httpd-php
</Files>

and neither method worked. Am I adding the code the wrong way or does it have to be in a particular order?

Marcia

12:01 am on Sep 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



AuthUserFile /home/dmoore2/public_html/_vti_pvt/service.pwd
AuthGroupFile /home/dmoore2/public_html/_vti_pvt/service.grp

There may be a problem with having Front Page extensions installed. That's what those _vti folders are. FP extensions and .htaccess don't get along 100%, you probably need to check with the host or reconsider using them and opt for SSI or PHP includes.

mista_phi

1:05 am on Sep 22, 2004 (gmt 0)

10+ Year Member



Marcia,

If the frontpage extensions are in fact causing the problem, simply removing the references from the .htaccess file doesn't resolve it. Do you have more information on this?

Thanks

mista_phi

1:14 am on Sep 22, 2004 (gmt 0)

10+ Year Member



isitreal

just found out that the AcceptPathInfo directive is available in Apache 2.0.30 and later.

I'm running on version 1.3.31. No good.

isitreal

2:04 am on Sep 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Oh, sorry about that, ok.

jdMorgan

2:13 am on Sep 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



> Premature end of script headers: /home/dmoore2/public_html/test_file

That usually indicates an error in the script or in the paths it's trying to use. Basically, if anything goes wrong in the script, you can get that message.

Jim