Adding Ignore list in Apache .htaccess

Discussion in 'Apache' started by theextelligence, Mar 24, 2011.

  1. #1
    Hi

    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]
    
    Code (markup):
    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

    /blog
    /forum/
    and all php files i.e. *.php
    Code (markup):
    is this possible?

    Any help will be appreciated.


    Thanks in advance
     
    theextelligence, Mar 24, 2011 IP