Welcome Guest, Not a member yet? Register   Sign In
External links adding parameters - how to allow these without allowing query strings?

Hi all,

Our email newsletter script adds the following string to any URLs we put inside it:


This breaks my site with the 'disallowed URL characters' error. I don't want to enable query strings because this breaks some of my other links and makes things like pagination URIs look ugly which I don't want. There's no way to turn off these referral links, so how can I make them work?

Methods I've tried:

1. Adding a .htaccess rule (gave a 500 server error...)
2. Adding a routes.php rule (the only time I got it to work meant that 'normal' links failed)
3. Experimenting with different characters in the permitted_uri_chars config item (nothing happened)
4. Combinations of values for uri_protocol and enable_query_strings (see above)

If it helps, the structure of my URLs is like this:

$route['review/(:any)/(:any)/(\d+)'] = 'review/view/$3';

I tried adding this but it failed to work:

$route['review/(:any)/(:any)/(\d+)?(:any)'] = 'review/view/$3';

Any ideas?

[quote author="mattpointblank" date="1254756408"]

I think % is allowed in the URL. Using PHP function urlencode make your string to look:

You should try to use in this way:

I can't change the string that gets appended, that happens automatically from the email software.

Also, I don't really want to hardcore the string into a function argument (if that's what you mean) in case it changes etc.

Theme © iAndrew 2016 - Forum software by © MyBB