0

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?

1 Answer 1

3

On top of the htaccess start with putting the RewriteEngine to on

RewriteEngine On

After that you can add your rewrite rule. Which will be something like:

RewriteRule ^userskill/$ index.php [QSA,L]

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.