Jump to content

[SOLVED] Remove PHP Information


Ninjakreborn

Recommended Posts

If you have a server, and it has directory listings on, the obvious thing to do is bring in HTAccess and fix that.

I did that, then when the directory doesn't come up this come's up.

 

www.domainname.com

03/09/07 10:17:57

Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.0

Either way that is a hell of a lot of information, is there a way to remove all of that, and just have the

"Access Forbidden" text that is above this, thanks.

Link to comment
https://forums.phpfreaks.com/topic/41972-solved-remove-php-information/
Share on other sites

If you add the following to an .htaccess file:

Options -Indexes

Then it should come up with 404 Forbidden message. When you browse to a directory that doesn't have a index file it in it.

 

Or add this:

ServerSignature Off

to an .htaccess file and the server signature should not show - which is this bit:

Apache/2.2.3 (Win32) DAV/2 mod_ssl/2.2.3 OpenSSL/0.9.8d mod_autoindex_color PHP/5.2.0

Do you know what the AllowOverride option is set to in the httpd.conf for the main <Directory /> area ( found around line 200 in the httpd.conf).

 

It must have the following two options listed: FileInfo and Indexes or set to All in order for the configuration options in the .htaccess file to be applied otherwise Apache will just ignore what is set in the .htaccess file.

Perfect, I will check into that.

So pretty much different things have to be turned on/turned off in order to allow it to be physically affected by HtAccess.

You must give Apache sufficient configuration with the AllowOverride directive in order for Apache to abide by the configuration set forth in the .htaccess.

 

If you don't have FileInfo listed in the AllowOverride directive then Apache will ignore .htaccess files.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.