Apache 307 Redirect to redirect POST data Apache 307 Redirect to redirect POST data apache apache

Apache 307 Redirect to redirect POST data


You can't match against querystring using a Redirec directive. You need to match against %{QUERY_STRING} variable using mod-rewrite. The following rule does what you want :

RewriteEngine onRewriteCond %{QUERY_STRING} ^view=account&task=paypal$ [NC]RewriteRule ^/?index\.php$ http://example.com/paypal/? [R=307,L]

? at the end of the destination url is important as it avoids appending old querystring to the new url.