apache - .htaccess rule not catching -
i'm trying catch http://mysite.loc/orders/invoice/?id=asdf , redirect it, it's not catching. have ideas on might've missed?
rewriteengine on rewriterule ^orders/invoice?id=([^/]+)$ /store/order/view?hash=$1 [r=301,l,nc]
rewrite rules act on request uris. query string (the question mark , after it) not part of uri can't write pattern match it.
try this:
rewriteengine on rewritecond %{query_string} id=(.*) rewriterule ^orders/invoice /store/order/view?hash=%1 [r=301,l]
Comments
Post a Comment