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

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -