Mod Rewrite/RegEx
Posted: Mon May 19, 2008 9:54 pm
So I have some rewriting in my .htaccess but I wish to make an exception. First of all, how do I make an exception? What I mean is let's say if the url is pointing to an EXE file than I want it to process like normal and ignore all rewriting rules below it. Here's what I currently have:
What I want to do is for all requests that have a valid file extension at the end of them, process them like normal instead of passing them to /index.php. So my questions are:
1) How do I make exceptions with Rewrite?
2) What RegEx can I use to check if the given URL has a valid file extension at the end?
Thanks in advance
Code: Select all
RewriteEngine on
RewriteRule ^([A-Za-z].*)/ index.php?query=$1 [nc]
1) How do I make exceptions with Rewrite?
2) What RegEx can I use to check if the given URL has a valid file extension at the end?
Thanks in advance