开发者

How can I get the full query string of a page

I'm using joomla and acesef as a plugin and I need to get the full querystring as is. The开发者_开发技巧 problem is when I use $_SERVER['QUERY_STRING'] it contains the joomla QS isntead of my custom parameters.

A javascript or PHP solution would do. thanks

Edit: Sample URL www.test.com/sc/my-account.html?action=payment-method I want to get

action=payment-method

Instead I get

option=com_content&Itemid=4&id=16&lang=sc&view=article


Your Joomla setup probably has a mod_rewrite rule in .htaccess that is ignoring the original GET parameters and rewriting the whole GET query string, you'll have to hack your way into the .htaccess file.

Or stop using Joomla.


Found the one that solves my problem var qs = window.location.search.substring(1);

Thanks everyone SO rocks :)


You don't get what's in the URL, you get what the server hands you. That includes parameters added by things such as mod_rewrite. If you need specific parameters then index $_GET[] appropriately, otherwise live with it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜