views:

34

answers:

1

Hi

I have the following .htaccess:

RewriteEngine on
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
rewriterule .* LoadSite.php

What I am trying to do is that if the file doesn't exist then call LoadSite.php... this will then load any number of other php files via include (depending on the url).... this works for a GET request, but when the a POST is made, I does a 302 redirect and therefore the script doesn't get the POST variables. Any ideas would be appreciated

A: 

Tested and works:

.htaccess:

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule (.*) /err.php?reason=404
</IfModule>
Levon Mirzoyan