Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 10-04-2005, 10:14 AM   #1
Registered: Dec 2003
Distribution: Cent OS 4.1
Posts: 38

Rep: Reputation: 15
AddHandler server -- AddType application (will not work togeather)?

I canít figure this out. I need to add the following lines to my .htaccess

AddType application/x-httpd-php .html .php .htm

Great! Now php includes work in my html pages

DOLT!!! The following line is "ALSO" in my .htaccess file:

AddHandler server-parsed .htm .html

This is needed to parse my SSI includes for web logging.

So, whatís the problem? I canít add the following two lines (at the same time) in .htaccess:

AddHandler server-parsed .htm .html
AddType application/x-httpd-php .html .php .htm

If I do, the page invokes a download prompt. What am I supposed to do so I can use both of them together?

Any help would be muchly appreciated,

Old 10-04-2005, 03:43 PM   #2
Registered: Sep 2004
Location: UK
Distribution: Ubuntu
Posts: 117

Rep: Reputation: 16
I'm not sure why you cant have both together - presumably because the PHP parser wont understand SSI and vice versa. What SSI's do you need that cant be reproduced easily with PHP?
Old 10-04-2005, 05:55 PM   #3
Registered: Dec 2003
Distribution: Cent OS 4.1
Posts: 38

Original Poster
Rep: Reputation: 15
GrinÖ How about doing it this way: <!--# include virtual = "/block.php" -->

And, using only this in .htaccess: AddHandler server-parsed .htm .html Ah.. That works. SSI's still function and I can now call my php script

I havenít used includes in so long, (or at least trying to parse php in html pages), I forgot how. Block.php eliminates referrer spam and it works well.

As for why:

(AddHandler server-parsed .htm .html, and AddType application/x-httpd-php .html .php .htm) wonít work together, I suppose that will remain a mystery for now.

Thanks for your reply,



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache error - Invalid Command 'AddType'... humbletech99 Linux - Networking 0 11-28-2005 08:22 AM
Apache problem with AddHandler mago Slackware 10 11-25-2005 08:38 AM
I can't get an installed application to work Rodotheos Linux - Software 3 06-10-2005 10:36 AM
How can I use these machines togeather? jimdaworm Linux - General 8 02-26-2005 09:56 PM
Link to application does not work gmichel Linux - Newbie 2 01-13-2004 11:01 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:37 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration