Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 28058

rewrite for page with cflocation (location)

$
0
0

Sample URL = http://www.mysite.com/path/to/folder/testpage.cfm (IIS and Coldfusion 9 on Windows Server 2008)

DNS rules route www.mysite.com to our 'pirate' (ARR) server (in the DMZ). URL rewrite rule (See below) will rewrite URL tohttp://cf9.mysite.com{REQUEST_URI} . DNS for the ARR server sends the request to the CF9 server (in a protected DMZ area).

The testpage.cfm has one line in it

<CFLOCATION URL="http://www.yahoo.com" > (That command should do a 'location' command to the Yahoo site so the Yahoo home page will be displayed)

If the http://www.mysite.com/path/to/folder/testpage.cfm is run on the 'pirate' or 'cf9' server's browser, the CFLOCATION redirects to Yahoo properly.  If the URL is run on a local (internal) workstation (which DNS sends to the pirate server), the http://cf9.mysite.com/testpage.cfm is displayed (which doesn't exist, so a 404 happens).

THe URL rewrite rule (at the IIS site level on the pirate server) is

<rule name="CF9 Server " enabled="true" stopProcessing="false">
        <match url=".*" />
         <conditions logicalGrouping="MatchAll" trackAllCaptures="false">                        
              <add input="{HTTP_HOST}" pattern="^cf9.mysite.com(.*)" />                    
        </conditions>                    
       <action type="Rewrite" url="http://cf9.mysite.com{REQUEST_URI}" appendQueryString="false" logRewrittenUrl="false" />                
</rule>

The Failed Request tracings show that the "General Response Header" "Location" value is set tohttp://cf9.mysite.com/testpage.cfm" when it should behttp://cf9.mysite.com/path/to/folder/testpage.cfm .  I can't see where in the request tracing this is happening, or why the rewrite rule is not working properly.

Thanks, Rick....


Viewing all articles
Browse latest Browse all 28058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>