Jump to content
Sign in to follow this  
reportingsjr

.htaccess not working correctly

Recommended Posts

This may be for the php forum but I dont know.. I tried to do the thing where you write this in an .htaccess file:AddType application/x-httpd-php (dont know if its right, just took it right out of meh brain!)I put .php .htm .html after it, but whenever I tried to go to an html page on my site in a sub directory it tried to force a download. I looked it up and tried another way that said would remove the forced download, but it still comes up! Im using php version 4.something (higher up, not an older one). So any help appreciated!

Share this post


Link to post
Share on other sites

I know this isn't helping you, but I was wondering what is the .htaccess file and what is it used for?Is it for apache server hook-ups or something?

Share this post


Link to post
Share on other sites

Its a file where you can control other files, you can password protect directories and files, and a bunch of other things. Go google it :).

Share this post


Link to post
Share on other sites

If the server has PHP support disabled, you won't be able to enable it just like that. Also, I think AddType is only relevant when PHP is running as a CGI binary, but it might be running as Apache module.

Share this post


Link to post
Share on other sites
Its a file where you can control other files, you can password protect directories and files, and a bunch of other things. Go google it :).
Thanks, now I know how to stop some idiot from taking all the info out of user text files. :)

Share this post


Link to post
Share on other sites
I think AddType is only relevant when PHP is running as a CGI binary, but it might be running as Apache module.
You know what, I bet you that is it! Is there any other way to do it?

Share this post


Link to post
Share on other sites

This is what works for me...

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×