I am new with mod_rewrite and have come across an issue. I am building a site where the site goes through one file index.php and index.php handles the right code it needs to pick up.
I set up my links to look like example.com/user and that is being rewritten as example.com?section=user.
The problem that I am having is I have two files in my root directory and when I go to example.com/search it loads up an old file called search.php. I only have index.php and search.php in my root directory. If I use example.com?section=search then it works fine. If I do example.com/user like my first example then it works fine. I don't know why it is picking up search.php and I don't want it to pick up search.php.
My current mod_rewrite rules look like
RewriteRule ^([A-Za-z0-9]+)/?$ index.php?s=$1 [NC,L]