user434885 user434885 - 1 year ago 76
PHP Question

How to change .php extension of website pages?

I have a website running on PHP. I want to remove the

suffix from all of my webpages in such way that the user doesn't get to know what server side language is running.

How do I edit the displayed address in the address bar to not show the

Answer Source

With mod_rewrite in .htaccess:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L] 
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download