farcrySolrPro plugin - rewrite rule

18 views
Skip to first unread message

AJ Mercer

unread,
Apr 18, 2012, 11:46:31 PM4/18/12
to farcr...@googlegroups.com
For anyone else (or future self) using farcrySolrPro plugin
and have friendly URLs set up
I have added the following rewrite rule to my set up


/search?q=ajm&operator=any&lContentTypes=&orderby=rank

RewriteCond %{REQUEST_URI} ^/search
RewriteCond %{QUERY_STRING} ^q\=(.*)$
RewriteRule ^/search(.*)$ /index.cfm?q=%1&furl=/search [L]

If anyone has suggestions to improve I would be grateful on seeing them.
This is working for me and my head hurts now, so I am going to leave it alone for now :-S


--

AJ Mercer
<webonix:net strength="Industrial" /> | <webonix:org community="Open" />
http://twitter.com/webonix

Justin Carter

unread,
Apr 19, 2012, 12:02:05 AM4/19/12
to farcr...@googlegroups.com
I haven't used FarCry Solr Pro yet, but I don't think there is any requirement to add additional rewrite rules is there? I haven't seen any in the docs, and the URL that you're rewriting to is basically what the standard URL rewrite will do (furl is dynamic though, whereas your is hard-coded to /search).

cheers,
Justin

AJ Mercer

unread,
Apr 19, 2012, 12:05:11 AM4/19/12
to farcr...@googlegroups.com
I was loosing everything on the URL scope besides
URL.furl=/serach

--
You received this message cos you are subscribed to "farcry-dev" Google group.
To post, email: farcr...@googlegroups.com
To unsubscribe, email: farcry-dev+...@googlegroups.com
For more options: http://groups.google.com/group/farcry-dev
--------------------------------
Follow us on Twitter: http://twitter.com/farcry

Justin Carter

unread,
Apr 19, 2012, 12:14:10 AM4/19/12
to farcr...@googlegroups.com
Hmmm... I wonder if your old URL rewrites were doing something funky then?

I usually use this for Apache mod_rewrite:
RewriteEngine On
RewriteCond %{REQUEST_URI} !(^/farcry|^/webtop|^/flex2gateway|^/flashservices|^/CFIDE)($|/)
RewriteRule ^([a-zA-Z0-9\/\-\%:\[\]\{\}\|\;\<\>\?\,\*\!\@\#\$\ \(\)\^_`~]*)$ /index.cfm?furl=$1 [L,PT,QSA]

and this for IIS Rewrite in IIS 7.x (using the import option):
RewriteCond %{REQUEST_URI} !(^/farcry|^/webtop|^/flex2gateway|^/flashservices|^/cfide)($|/)
RewriteRule ^([^\.]+)$ /index.cfm?furl=/$1&%1 [L,PT,QSA]

The "QSA" means "query string append" which means any existing query string variables should make it through to the rewritten URL.

cheers,
Justin

Justin Carter

unread,
Apr 19, 2012, 12:15:01 AM4/19/12
to farcr...@googlegroups.com

AJ Mercer

unread,
Apr 19, 2012, 12:22:27 AM4/19/12
to farcr...@googlegroups.com
D'oh!
I did not have [QSA] on my rule

working as advertised now - thank you Justin

Jeff Coughlin

unread,
Apr 19, 2012, 1:36:35 AM4/19/12
to farcr...@googlegroups.com
We had set the default action page to use URL variables (and the pagination links use  by default) to allow people to easily add the site search variable functionality in something like Google Analytics.  If you'd prefer it to automatically go right to an FU instead, just override the webskin in the plugin.

--
Jeff Coughlin

tHeSmUrF

unread,
Apr 19, 2012, 7:45:18 PM4/19/12
to farcr...@googlegroups.com
@Justin: Any reason why in IIS you don't tick both the "ignore case" options?
 
Cheers
Mark
 

Justin Carter

unread,
Apr 19, 2012, 9:54:26 PM4/19/12
to farcr...@googlegroups.com
@Mark: I don't think I've ever run into any case sensitivity issues with IIS 7.x to need to explore any further configuration options :)

cheers,
Justin

 

--
Reply all
Reply to author
Forward
0 new messages