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: macek, egami, gesf

MikeSpider
New php-forum User
New php-forum User
Posts: 49
Joined: Sun Feb 05, 2012 12:48 pm

Hiding file extensions through .HTACCESS

Postby MikeSpider » 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,
Mike

seandisanti
php-forum Fan User
php-forum Fan User
Posts: 838
Joined: Mon Oct 01, 2012 12:32 pm

Re: Hiding file extensions through .HTACCESS

Postby seandisanti » Tue Nov 27, 2012 9:33 am

Verify in your apache modules that you have your rewrite_module enabled


Return to “PHP & MySQL Security”

Who is online

Users browsing this forum: No registered users and 2 guests

cron