Link to home
Start Free TrialLog in
Avatar of Dan
DanFlag for United Kingdom of Great Britain and Northern Ireland

asked on

wordpress url rewriting plugin

I want that if someone links to our wordpress site and somewhere in the query string there is aaa=<value> then for all external links they are re-written to include that at the end, also the <value> needs to be preserved if the user changes pages and moves around the site, so I'm guessing it needs to be added to the session.

How is this possible?
ASKER CERTIFIED SOLUTION
Avatar of NerdsOfTech
NerdsOfTech
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Dan

ASKER

I agree but how can I in Wordpress grab the parameter when it comes in and then have it added to the session then have it added on all links out of the site?
Once that data is in a session, the link no longer needs to retain that data. The data can then be read from the session.
Avatar of Dan

ASKER

I know once it is in the session it does not need to be passed around, but (1) how do I get it into the session (2) how do I get it out again.

I found this plugin GET Params https://wordpress.org/plugins/get-params/ that will take a param and pass it out, but I basically want this but it pulls from the session value and the session value is set when that variable is incoming.
To create the cookie, you will either have to write custom code or you can use a plug in like cookie monster  https://wordpress.org/plugins/cookiemonster/