Welcome to WebmasterWorld Guest from 22.214.171.124 , register , free tools , login , search , pro membership , help , library , announcements , recent posts , open posts Become a Pro Member
.htaccess AddType problem Bringing up a download box sanblasena
I wanted to use AddType in .htaccess so I could use PHP includes in HTML files. On one of my servers it worked fine. On the other server it is bringing up a download box when I access the page. Any ideas?
What does the line in .htaccess look like? sanblasena
The line is
AddType application/x-httpd-php .html .htm
Which server is that from the working one, or the non-working one? And what does the other server's AddType line look like?
More detail = better/faster help.
I used the exact same code on both servers.
Have you tried this?
AddType application/x-httpd-php .html .htm .php
I also found a bug report which
may bear on your problem here [ phpbuilder.com].
Thanks, I tried that, same problem. I ran accross this theme several times in trying to research this problem.
"Since servers can't parse for BOTH SSI and php, this resulted in the download-prompt problem."
This "download-prompt problem" is exactly what I am getting but my htaccess does not request that it parse SSI. I wonder if some option is set on the server to parse SSI? Patricia
I just had the same thing today. PHP (hello world) worked fine with just that in .htaccess but did the download thing with the shtml/html thing. Took that out and it stopped.
In fact, I was going to bring up a question in a thread that could relate to Patricia's case, might as well get to it now.
What if we want to use PHP on a site - but want to run a log program that uses ssi? What do we do if we can't use both?
You could try adding:
Options -Includes to your web root .htaccess and see if that changes anything. You may need to find out what is going on in the server config to solve this one... If they've got an AddHandler server-parsed of any kind, that may interfere with what you are trying to configure.
Anybody else got any ideas?
I found this old post that might be helpful in my case - I only want to do PHP.
I havent tried it yet. I'm a little bit over my head.