Forum Moderators: phranque

Message Too Old, No Replies

.htaccess trouble

adding the AddType php line makes my website ask me to save a file

         

dougmcc1

7:39 pm on Jul 5, 2003 (gmt 0)

10+ Year Member



Here is my .htaccess file code:

AddType text/html .shtml .html .htm
AddHandler server-parsed .shtml .html .htm
Options Indexes FollowSymLinks Includes

This works great, my SSI works and I can use .htm instead of .shtml as the file extension. But now I want to add PHP to my site and I want to continue using the .htm file extension. But when I upload my new .htaccess file:

AddType text/html .shtml .html .htm
AddType application/x-httpd-php .php .htm
AddHandler server-parsed .shtml .html .htm
Options Indexes FollowSymLinks Includes

it asks me to save a file to my computer when I go to my website. What's up with that? I have a Flash movie and external javascripts if that makes any difference.

dougmcc1

9:51 pm on Jul 6, 2003 (gmt 0)

10+ Year Member



I moved all my php files into another directory and moved my .htaccess file with the php line in it into that directory so it doesn't ask me to download a file anymore, but the php code in my .htm files still isn't getting parsed.

oilman

4:50 pm on Jul 7, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



doug - are you sure that php is properly installed on your server? your syntax for the addtype application line is correct - it should work.

dougmcc1

5:36 pm on Jul 7, 2003 (gmt 0)

10+ Year Member



Yeah my website is being hosted by a web hosting company.

They do, for sure, accept .htaccess files and php works fine when I have the .php extension. Do you think I need to add ".php" to this line?
AddHandler server-parsed .shtml .html .htm

Also, let me give you some more background info. My php pages are in a sub-directory, which is where I put the .htaccess file with the php addtype. If I put the php addtype line in my .htaccess file in the root folder, then when I go to my website it asks me to download a file every time. My homepage has a javascript Flash plugin detect script and a redirct script (they get the flash index if they have the plugin, or they get a text version if they dont).

Hope that brings up any more possibilities/suggestions.