Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is the best way to hide Php file Extension?

Like:localhost/a.php to localhost/a

user-image
Question added by Mohibur Rahman , CTO , CRYPT TECHNOLOGY
Date Posted: 2013/04/13
Zaid Rabab'a
by Zaid Rabab'a , Software Development Team Leader , Al-Safa Co. Ltd.

use .htaccess you can find alot of articles talk about it

Hazem Salama
by Hazem Salama , Senior Member of Technical Staff , Verizon Communications

You can do via the .htaccess file. See some examples here http://php.net/manual/en/security.hiding.php

Mo'ath Al Mallahi
by Mo'ath Al Mallahi , Senior PHP Developer , iHorizons

Hi, best way is to use the extension .inc or anything similar to, after that you can disallow the accessing to these files extensions by the .htaccess

Muhammad Majid Saleem
by Muhammad Majid Saleem , Senior PHP Developer / Project Manager , SwaamTech

Yes - .htaccess file is the way by which you can hide real extension of your files from url. There are many other things which you can do using .htaccess file like: - Block specific IP to access your website. - Allow specific IP to access your website. - Stop specific folder to be shown - Allow specific page to be displayed as an error page. and many other things. Have a look on this article: https://my.bluehost.com/cgi/help/htaccess

islam khalil
by islam khalil , Technical Manager , iCloudit

Many helpful answers : and i like to share this with you : http://php.net/manual/en/security.hiding.php also Use .htaccess and URL Rewrite :D

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.