PHP $ _GET变量在URL中重新排列,为什么? [关闭]

When I go to:

https://sitedomain/product-name-p-1106.html?ref=facebook&keyw=pagetype0:friends

The url changes to:

https://sitedomain/product-name-p-1106.html?keyw=pagetype0friends&ref=facebook

Basicly the $ref and $keyw variables reverse. Why is this happening and how can I stop it?

Note: I am trying to use a script that relies on them being in the order $ref then $keyw that someone else wrote and I would like to keep them in that order to not modify that script.

I think it might be the .htaccess file but not sure, here is the file for that:

RewriteBase / 
RewriteRule ^([a-z0-9/-]+)-p-([0-9]+).html$ product_info.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-c-([0-9_]+).html$ index.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-m-([0-9]+).html$ index.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-pi-([0-9]+).html$ popup_image.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-pr-([0-9]+).html$ product_reviews.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-pri-([0-9]+).html$ product_reviews_info.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-t-([0-9_]+).html$ articles.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-au-([0-9]+).html$ articles.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-a-([0-9]+).html$ article_info.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-i-([0-9]+).html$ information.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-links-([0-9_]+).html$ links.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-n-([0-9]+).html$ newsdesk_info.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-nc-([0-9]+).html$ newsdesk_index.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-nri-([0-9]+).html$ newsdesk_reviews_info.php [NC,L,QSA]
RewriteRule ^([a-z0-9/-]+)-nra-([0-9]+).html$ newsdesk_reviews_article.php [NC,L,QSA]

They are just named parameters and don't need any specific order. If you are relying on any specific ordering, you are doing something fundamentally wrong in your code.

The message I am getting here is:

Don't ever make or use code that depends on the order of URL parameters

$_GET vars shouldn't be dependent on the order unless you're foreaching $_GET and blatantly ignoring indexes. Also, MOD_REWRITE doesn't re-order things in the URI on the browser side but only changes the order/assignment server-side.

As others have said, something is very wrong if the order is that important and in which case I'd pass the value as a delimited string as opposed to individual $_GET values.

I know you "don't want" to rewrite this script, but as someone else said think of what else it might be doing wrong? Further, do you really want a point of failure like this?