View Full Version : Adding Ignore list in Apache .htaccess

03-24-2011, 07:17 PM

I currently have an .htaccess file and what it does is, when someone types the url http://example.com/username, it calls the user_profile.php page in the backend and shows the user's profile for the username supplied.

The contents of the ,htaccess file is

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/?$ user_profile.php?id=$1& [L,NC]

The code works fine so far only that when someone types http://example.com/blog or http://example.com/forum it treats them as the username.

I was wondering if we can add an ignore list or something in the .htaccess file for the following

and all php files i.e. *.php

is this possible?

Any help will be appreciated.

Thanks in advance