Hiding file extensions through .HTACCESS

Security issues related to php and mysql usage. How to make your code secure? Security measures and configurations? It's all in here!

Moderators: egami, macek, gesf

Post Reply
php-forum Active User
php-forum Active User
Posts: 49
Joined: Sun Feb 05, 2012 12:48 pm

Wed Nov 21, 2012 7:08 pm

Hi guys,
I came across this on the web:

Code: Select all

Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+)$ /$1.php [L,QSA]
I created a .htaccess file in my project root folder,
pasted it, saved it, but nothing changed.

If is any relevant, I'm running it locally (XAMPP)

Thanks in advance,
php-forum GURU
php-forum GURU
Posts: 974
Joined: Mon Oct 01, 2012 12:32 pm

Tue Nov 27, 2012 9:33 am

Verify in your apache modules that you have your rewrite_module enabled
Post Reply