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
Zamblek
  • 789
  • 1
  • 12
  • 21

2 Answers2

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

Tom van der Woerdt
  • 29,532
  • 7
  • 72
  • 105
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.

Community
  • 1
  • 1
Romi Halasz
  • 1,949
  • 1
  • 13
  • 23