I’m trying to write a rewrite rule in my .htaccess file but not sure how to get it working. I want to convert this URL:
http://www.example.com/userskill/?lvl=100k
to
http://www.example.com/?lvl=100k
The underlying page would ultimately be http://www.example.com/home.html?lvl=100k. How can I add a rewrite rule in my .htaccess file to do this?
On top of the htaccess start with putting the RewriteEngine to on
After that you can add your rewrite rule. Which will be something like:
The QSA part copies the query string from the url.
For more information see
http://forums.devshed.com/apache-development-15/question-about-query-string-in-a-rewrite-url-htaccess-557476.html
http://vikrant_labde.blogspot.com/2008/07/querystring-in-htaccess-match-question.html