UrlGuy
01-31-2006, 07:46 PM
Hi,
I'm helping a friend who runs a free-hosting service.
To prevent abuse he would like to disable all php/perl/cgi (and similar) scripts.
I thought using htaccess for this would be a good idea. I have already used htaccess to force ads in header/footer of their pages.
The problem is, I dont know how to. I've asked in different IRC rooms and looked on apache page, without any luck.
The current .htaccess file now looks like this:
AddHandler headered .htm
AddHandler headered .html
Action headered http://localhost/ads/ads/config.php
This code is just for the ads.
I have tried adding this:
AddType text/plain php
which were supposed to parse php as text.
This doesn't work. When I use the above, all pages give 404 not found error.
I also need to have php enabled on a few files, which is required for the free-hosting services script which sets up the accounts.
I also don't know what directories to do this to, as they are being setup automaticly.
So the htaccess should have this rule to affect ALL files, except a few specified ones (which are the hosting script files)
Anyone know how I can parse php as text or html with a .htaccess?
Thanks in advance for all replies!
Best rgds,
~urlguy
I'm helping a friend who runs a free-hosting service.
To prevent abuse he would like to disable all php/perl/cgi (and similar) scripts.
I thought using htaccess for this would be a good idea. I have already used htaccess to force ads in header/footer of their pages.
The problem is, I dont know how to. I've asked in different IRC rooms and looked on apache page, without any luck.
The current .htaccess file now looks like this:
AddHandler headered .htm
AddHandler headered .html
Action headered http://localhost/ads/ads/config.php
This code is just for the ads.
I have tried adding this:
AddType text/plain php
which were supposed to parse php as text.
This doesn't work. When I use the above, all pages give 404 not found error.
I also need to have php enabled on a few files, which is required for the free-hosting services script which sets up the accounts.
I also don't know what directories to do this to, as they are being setup automaticly.
So the htaccess should have this rule to affect ALL files, except a few specified ones (which are the hosting script files)
Anyone know how I can parse php as text or html with a .htaccess?
Thanks in advance for all replies!
Best rgds,
~urlguy
