I want to redirect every url to a single php file that will act as a dispatcher that will pull content from a DB based on the url. I am unsure what is wrong with this. Any pointers please.
<IfModule mod_rewrite.c>
AddDefaultCharset utf-8
rewriteCond %{REQUEST_URI} !(^/admin/)
rewriteCond %{REQUEST_URI} !(\.css$)
rewriteCond %{REQUEST_URI} !(/robots\.txt$)
rewriteCond %{REQUEST_URI} !(\.png$)
rewriteCond %{REQUEST_URI} !(\.jpg$)
rewriteCond %{REQUEST_URI} !(\.jpeg$)
rewriteCond %{REQUEST_URI} !(\.pdf$)
rewriteCond %{REQUEST_URI} !(\.gif$)
rewriteCond %{REQUEST_URI} !(\.GIF$)
rewriteCond %{REQUEST_URI} !(\.xml$)
rewriteCond %{REQUEST_URI} !(\.js$)
rewriteCond %{REQUEST_URI} !(\.ico$)
RewriteRule . pageDispatcher.php [L]
Change your code to this: