Copy link to clipboard
Copied
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?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Where do i add this condition? Apache or CF services-config.xml?
Copy link to clipboard
Copied
Apache
Copy link to clipboard
Copied
but b/c it is the corporate server rewriting all URLs (separate from my App server) would a change on my Apache server settings even do anything?
Copy link to clipboard
Copied
Well, what are they being rewritten to? Is it a predicatble pattern? If so, you may be able to re-rewrite them. So if your VPN rewrites them, (btw that should not be happening, so the real problem is w/ the VPN and it should really be fixed there, but thats a different conversation) can you have Apache "fix" them?
Just thinking out loud here.