how to use htaccess redirect

Question: Do you know how we can redirect where the old website has query on it

example: Redirect 301 /detail.asp?ID=130 http://allpowersolution.com/used-gas-generators/

Tried to implement the following but it didn't help:
https://simonecarletti.com/blog/2009/01/apache-query-string-redirects/

Please check the chat for more info.