wnoveno
wnoveno

Reputation: 546

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

Upvotes: 4

Views: 7209

Answers (3)

wnoveno
wnoveno

Reputation: 546

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

Thanks everyone SO rocks :)

Upvotes: 1

Alix Axel
Alix Axel

Reputation: 154603

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.

Upvotes: 1

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799062

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.

Upvotes: 0

Related Questions