Ignore existing files/folder with.htaccess
Posted: Tue Dec 22, 2009 10:16 pm
I have the following which works:
The last 3 lines are what I probalby want to comment out, but I think this would mean I would have to handle image requests and everything which I do not want to do. I have an index.php in a root directory and some custom scripts in a sub-directory which are invoked like:
I would like to intercept these requests and perform custom processing and then continue letting each handle the request from there on in. Do I have to emulate an HTTP request forward or something internally within my own index.php located in the root directory?
Is there an easy way to perform this request, basically just catching the request (doing my thing) then emulating/copying the exact request by forwarding the HTTP request exactly as it was intercepted???
Even if I had to execute an binary or something so I don't have to implement an HTTP client inside my index.php that would be awesome...
Any ideas?
Cheers,
Alex
Code: Select all
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^pcspectra.com [NC]
RewriteRule ^(.*)$ http://www.pcspectra.com/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,NC,L]Code: Select all
scripts/add_contact.php
scripts/add_contact.php?dept=3&owner=4Is there an easy way to perform this request, basically just catching the request (doing my thing) then emulating/copying the exact request by forwarding the HTTP request exactly as it was intercepted???
Even if I had to execute an binary or something so I don't have to implement an HTTP client inside my index.php that would be awesome...
Any ideas?
Cheers,
Alex