Forum Moderators: phranque
RewriteBase /
#
# Copy HTTP Authorization header value to HTTP_AUTOHRIZATION server variable for use by my script
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# Rewrite requests for URL-paths which do not resolve to specific physically-existing
# filetypes to my script, excluding the script's URL-path itself.
RewriteCond $1 !^index\.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (^[^.]*|\.(php|html?|feed|pdf|raw))$ index.php [NC,L]
RewriteBase /
#
# Copy HTTP Authorization header value to HTTP_AUTOHRIZATION server variable for use by my script
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# On live server, rewrite requests for URL-paths which do not resolve to specific
# physically-existing filetypes to my script, excluding the script's URL-path itself.
RewriteCond %{HTTP_HOST} !^localhost$
RewriteCond $1 !^index\.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (^[^.]*|\.(php|html?|feed|pdf|raw))$ index.php [NC,L]
#
# On localhost dev server, rewrite requests for URL-paths which do not resolve to specific
# physically-existing filetypes to my dev script, excluding the script's URL-path itself.
RewriteCond %{HTTP_HOST} ^localhost$
RewriteCond $1 !^localhost_path/index\.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (^[^.]*|\.(php|html?|feed|pdf|raw))$ localhost_path/index.php [NC,L]