htaccess forward (rewrite) rule

Posted at

the following rule will redirect but keep all request headers
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* ./pit/index.php?originalurl=%0 [PT,QSA,L]


the redirect page will be added originalurl= argument with all arguments (?variable=value&...)