On with my Mod ReWrite adventures...
Currently, I have a dynamic page in the root of my directory (shownews.php). Most of the pages in this root level are dynamic, so I have the following rewrite in my .htaccess file:
RewriteRule ^([^/]+)\.html$ /show_news.php?kw=$1 [L]]
So a url like http://www.domain.com/usa.html
would really display http://www.domain.com/shownews.php?kw=us
This works great. The problem is that I also have a contact page and a few other pages that fall victim to my mod rewrite. For example, a link to http://www.domain.com/contact.html
(which is a real page) would lead to http://www.domain.com/shownews.php?kw=contact
My show news script then fails, because it doesn't recognize the category 'contact.'
So my question is this:
How can I add directives to my .htaccess file that will display actual pages and ignore my shownews ReWrite Rule for specific pages(e.g. Contact, About, etc.).
Any help is appreciated.