I'm attempting to process all non-existant files using mod_rewrite, including the site's index (domain.com/).
Unfortunately, that last one is what I'm having trouble with.
Since this is part of a whole content-management system, and since I'm passing some vitals to PHP via [E=...], I really would like to not have to special-case the site index. Particularly, my host runs PHP as a CGI, rather than an Apache mod, so it's rather imperative that the HTTP:Authorization gets to PHP, as there's no other avenue I can think of.
Here's the .htaccess:
- Code: Select all
#Edit: Sussed it. Here's the soluted .htaccess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond %{REQUEST_URI} =/
RewriteRule .* /handler.php [QSA,E=ROOT:%{DOCUMENT_ROOT},E=PATH:%{REQUEST_URI},E=AUTH:%{HTTP:Authorization},L]
Any help would be much appreciated!