Click to See Complete Forum and Search --> : .htaccess problem on WinNT4


ppavlovic
02-12-2001, 07:59 AM
I have set-up .htaccess to look like this

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

Web server is Apache1.3.12 - Apache1.3.17, PHP4.0.pl1 as Apache module

httpd.conf entry is
AddType application/x-httpd-php .php

So, when I call this script as http://localhost/redirect/files/dwld.zip, Apache serves me source code for 'redirect' script.
Note: when PHP is set-up as CGI module, the call above issues an error.

I had that working properly earlier with Apache1.3.12, but after system reinstalation I can't get it right. What am I missing?

Help...

....coyote

keegan
02-13-2001, 07:25 PM
It looks like you're missing the Action directive (or LoadModule I guess if you're using PHP as an Apache module) which tells Apache exactly what to do with the application/x-httpd-php. Can you get to a normal .php file, or does it show the source for that too?

Or, maybe you should try:

<Files redirect>
ForceType application/x-httpd-php4
</Files>
# (notice the 4)

.. because it's possible that both the CGI and module versions of PHP are configured in Apache.

-Keegan

ppavlovic
02-14-2001, 04:42 AM
Keegan Miller wrote:
-------------------------------
It looks like you're missing the Action directive (or LoadModule I guess if you're using PHP as an Apache module) which tells Apache exactly what to do with the application/x-httpd-php. Can you get to a normal .php file, or does it show the source for that too?
-----------------------------------

Regular files with .php extension work. Entries in httpd.conf are
LoadModule php4_module d:/progra~1/php/sapi/php4apache.dll
and
AddType application/x-httpd-php .php


-----------------------
Or, maybe you should try:

<Files redirect>
ForceType application/x-httpd-php4
</Files>
# (notice the 4)
-----------------------


Nope, It doesn't work either :(

coyote