Farcrysolrpro pagination and + sign

Just wondering is anyone has a suggestion how to get around the β€˜+’ sign in the pagination with search results.
eg the original search call is:


but the pagination always renders like this:


This causes farcry not to be able to identify the /search page and so throws an error:

That page could not be found

If you manually change the URL to:


All is good.
Does anyone have a suggestion on getting this to work out of the box?

I just tried this in several different browsers and cannot replicate the problem yet.

What is your platform scenario? (FarCry version, plugin version, browser version)

Hi Jeff,
Linux CF11 FC706 farcrysolrpro1.2.11 (checked with current FF and Chrome)
Just tested it on running site using linux/railo4/FC702 with the same results.
just try putting /search/operator/any/q/honey+bee/orderby/rank/page/2 in the url, and getpage could not be found.
I have however produced a work around by extending the forms/farPagination.cfc and adding to thegetPaginationLinkHREF() :

 <cfset result = replace(result,'+','%20','all')>

But I’m surprised no one else has seen this.

You need to add + to the rewrite rule in IIS or Apache. I’ll post an example when I get to my desk. It’s not a problem with FC or the plugin but the example rewrite rule that everyone uses for Friendly URLs

OK, so change the rewrite rule like this:

RewriteRule ^([a-zA-Z0-9\/\-\%\+:\[\]\{\}\|\;\<\>\?\,\*\!\@\#\$\ \(\)\^_`~]*)$ /index.cfm?furl=$1 [L,PT,QSA]

Note the β€œ\+” after the β€œ%” entry. This allows for β€œ+” as a valid character in a URL, which it is, so it should be allowed.

I discovered this using the new EncodeForURL function in CF10+ which, unlike urlEncodedFormat() replaces spaces with plus characters instead of β€œ%20”.

1 Like

Sweet, that did the trick.
The rewrite rule was the last place I’d think of looking, so cheers for that Sean. :smile: