Solved

Inconsistent Redirects

Posted on 2013-10-30
4
243 Views
Last Modified: 2013-11-06
I'm having an issue with inconsistent redirects.
If you visit www.afge.org/benefits it should redirect you to http://www.afge.org/index.cfm?Page=MemberBenefits

Sometimes when you click the link it works and sometimes it hangs,
To reproduce this you can open "Private" browser windows and type "www.afge.org/benefits".

If you do this, you'll get mixed results, sometimes you'll get redirected to the target page and sometimes you'll get stuck waiting and it will time out.

If you inspect the request with a packet sniffer, you'll see that the 302 redirect gets to the browser but sometimes the browser just won't issue the request to the server to the new URI.

I'm completely stumped by this and was wondering if anyone has any insight into what may be causing this inconsistent behavior.

PS. Also, I'm tagging this question with Apache Tomcat because that's the application server that ColdFusion 10 sits on. The codebase is the same as we had it on ColdFusion 9 and the issue was not there. It started when we upgraded to CF10.
0
Comment
Question by:Rodrigo Munera
  • 2
4 Comments
 
LVL 26

Expert Comment

by:arober11
Comment Utility
What stack to you have e.g.  do you have an apache HTTPD instance sitting in front of the Tomcat?

Also what are you using to generate the Redirects: Apache HTTPD mod_rewrite, Apache HTTPD mod_alias, Apache Tomcat / Java, Cold Fusion Markup .....?

And what redirect rules (code) do you currently have?
0
 
LVL 4

Author Comment

by:Rodrigo Munera
Comment Utility
It's stacked on the latest version of IIS (I believe it's 7.5)

The redirects are being handled by CFML being run as a response to a 404. So /benefits path doesn't actually exist.

So the request comes in, 404 is triggered which is mapped to CFML component that looks up the value-pair for the requested path and does one of 2 things.

If there's a name-value pair for the requested path, it does a 301 cflocation redirect. (using ColdFusion's cfscript's cflocation equivalent which is just
location(url=finalURLaddress,addtoken="false",statusCode="301");

Open in new window


If there's no name-value pair, then the user is redirected to a custom 404 page using the same code above.
0
 
LVL 15

Accepted Solution

by:
myselfrandhawa earned 500 total points
Comment Utility
have u tried with simple meta tag rather than usin coldfusion's location tag
0
 
LVL 4

Author Closing Comment

by:Rodrigo Munera
Comment Utility
I'll give it a shot, cflocation is supposed to be a header redirect using meta data, and then you just set the code and text.

I've replaced the piece of code that does the forwarding the to the following:

	<cfheader statuscode="301" statustext="Moved Permanently">
	<cfheader name="Location" value="#destinationURL#">
	<cfabort>

Open in new window


Some initial testing seemed to show an improvement, time will tell.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Jquery oncheck to update SPAN 31 55
Library to convert HTML to PDF. 8 44
HTML button disabled 11 35
Bootstap Icons 3 18
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now