Skip to main content
January 9, 2012
Question

flex2gateway and URL rewrites

  • January 9, 2012
  • 1 reply
  • 1446 views

I'm not sure if this is a CF problem, Flex problem, or Apache server problem? Or maybe none of them? But how does one work around the issue of URL rewrites and flex2gateway path problems? My company allows users to login to the corporate network from outside the office and when they do all URLs are rewritten. HTML links work fine but flex apps cannot connect to the flash remoting to coldfusion. A network guy said he enabled a flash setting on the server but it hasn't solved the problem. Any one have any ideas on this one?

    This topic has been closed for replies.

    1 reply

    Sean Coyne
    Participating Frequently
    January 9, 2012

    You should use RewriteCond to check that the URL is one that you want to rewrite before you actually do the rewrite.

    For example, here is a rewrite rule I use.

    RewriteEngine On

    RewriteCond %{REQUEST_URI} !(^/flex2gateway|^/flashservices|^/CFIDE)($|/)

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

    The RewriteCond checks that the URL does not /flex2gateway /flashservices or /CFIDE before rewriting the URL.  Hope that helps.

    February 28, 2012

    Where do i add this condition? Apache or CF services-config.xml?

    Sean Coyne
    Participating Frequently
    February 28, 2012

    Apache