views:

291

answers:

3

Hi, 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

A: 

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.

Ignacio Vazquez-Abrams
I don't really need the specific parameters, I just need the whole thing so that I can pass it to another link on the page.
wnoveno
+1  A: 

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.

Alix Axel
A javascript solution is also acceptable. :)
wnoveno
@wnoveno: I'm not that into Javascript, but this question has a couple of solutions: http://stackoverflow.com/questions/901115/get-querystring-with-jquery, check it out. :)
Alix Axel
A: 

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

Thanks everyone SO rocks :)

wnoveno