2

What is wrong in this rule?

RewriteRule ^page\?v=([^/]+)$ page.php?v=$1 [L,NC]

I just want to make the URL looks like that

http://www.domainname.com/page?sk=info

2 Answers 2

2

You don't have to include the query parts if they're not changing anyway.

RewriteRule ^page$ page.php [L,NC]

The RewriteRule will not match any part of the query string. page?v=123 will still become page.php?v=123

Also, your RewriteRule uses ?v= while you talk about ?sk=info

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

Comments

0

Also, you can find additional information about this mod_rewrite case here: http://wiki.apache.org/httpd/RewriteFlags/QSA

And another SO entry about this issue here.

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.