Question

HTTP Headers (@sethttpheader("Location"; "http://somenewlocation")

Asked by: Bozzie4

I'm playing around with this to do some redirection in a form:
a field containing is located at the top :
@if( something ;
@sethttpheader("Location";"http://somenewlocation");"")

Now this works 'sometimes' , but not all the time...  I suppose because the HTTP Response code is not changed properly from 200 to 306...
The HTTP headers are there on the response from the server, it just doesn't work ....

So how could I do this - it's supposed to be a simple solution, preferably in @formula's .  Any ideas ?

cheers,

Tom

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2004-05-19 at 02:38:36ID20994451
Tags

sethttpheader

Topic

Lotus Notes

Participating Experts
3
Points
500
Comments
11

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. A formula in the header calls a dll
    I have a Crystal report that has a formula in the header. This formula calls a function in a VB dll, this dll updates an mdb Access database by creating a table. This table is used in the Details section of the Crystal report. In other words, the table needs to be created fir...
  2. Passing Headers in redirect
    Hi, I have an asp application running on multiple servers. Currently when the user is navigating between modules in the application they are prompted multiple times forlogin credentials. What i am trying to do is pass the login credentials as the user is navigating the appli...
  3. header(location) redirect question
    Im using header("location: http://www.cnn.com"); to redirect a page, the only prob is that this page is in a frame and I want it to redirect the whole page, not just the frame page, can this be done?
  4. Formula on Header
    Guys I’m trying to create a simple formula that will be on a group header. To created this formula I’m using two fields: Count of Customer_ID Sum of Order_Total The formula looks like this: Sum ({SYSOENT.ORDER_TOTAL}, {SYSCUST.CUSTOMER_ID}) / Count ({SYSCUST.CUSTOMER_ID...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: Bozzie4Posted on 2004-05-19 at 03:07:24ID: 11106485

Actually, it works for the first connection, when a user authenticates himself for the first time.  Then afterwards, he just continues (although the headers are sent to the browser)

 

by: sjef_bosmanPosted on 2004-05-19 at 05:51:48ID: 11107398

For what it may be worth: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

There's Location and Content-Location, see 14.30 and 14.40

Out of tricks indeed? ;)

 

by: Bozzie4Posted on 2004-05-19 at 06:03:39ID: 11107480

Working on new tricks actually :-)

It's Location I need, and it does work, but only the first time.  I also tried setting the browser to HTTP 1.0, but that completely didn't work ...
I just want a simple redirection method, really, that I can use in documents - 1 line of code is what I'm after :-)

Tom

 

by: p_parthaPosted on 2004-05-19 at 06:14:46ID: 11107570

Edit html attributes and in the HTML Head content, give a meta tag something like this:

<META HTTP-EQUIV="REFRESH" CONTENT="0; URL=http://www.bozzie.com">


Partha

 

by: sjef_bosmanPosted on 2004-05-19 at 06:23:52ID: 11107637

And you don't want to use standard redirection using HTTP-Equiv or JavaScript? You say, the second time the header contains the Location, but the browser doesn't respond on it? What's the difference between the first and the seconf header? Caching problem on either side? Do you also use other settings, such as Last-Modified or so? You can look at the ldd/performance documents, e.g. WebApps_caching.pdf, it describes some of the techniques "they" use in R6.

Got two donkeys here, they'd make good company for your pony. They might learn something ;)

 

by: sjef_bosmanPosted on 2004-05-19 at 06:25:00ID: 11107654

Bro, I suppose he wants the redirection hidden for all users. Should be a brilliant soln.

 

by: Bozzie4Posted on 2004-05-19 at 06:26:09ID: 11107667

The HTTP-EQUIV refresh thing is something I don't like to do ....

And I already looked at the LDD documents - oh well , though luck I guess :-(

 

by: p_parthaPosted on 2004-05-19 at 06:50:14ID: 11107844

hmm redirection needs to be hidden, why don't u write a webqueryopen(if efficiency doesn't matter that much) and do a location.replace for the $$htmlhead field...

BTW ur question made me to read abt HTTP headers and redirection , most of them talk only about location , let me know if u find out any...

Partha

 

by: qwaleteePosted on 2004-05-19 at 06:55:39ID: 11107893

The HTTP-EQUIV doesn't work because MS removed it in I think IE5 and up.  You could try sending a real refresh header.

A more Domino-ish way would be to open your forms (>OpenDocument) and documents (?EditDocument, ?OpenDocument) via an agent.  The agent takes params, tests conditions, and redirects either to the "expected" form/document, or else it redirects to you alternate.  Two problems with this method:
1) redirect ALWAYS occurs, instead of only for special conditions (normal condition produces redirect to the form or document)
2) bookmarks

A similar workaround might use a frameset.  The framset consists of a single frame, computed URL, with a default target of _parent.  The redirect calculation takes place in the formula.  Downsides:
1) user never gets to see a true URL
2) also effectively does a "needless" redirect for normal conditions, as the form has to load in the frame
3) bookmarks are unlikely to be a problem, but... a) MS does this weird thing with bookmarking framesets, not sure how the interaction will work, and b) users CAN right click in the frame and choose to bookmark

Re: your 200 v. 306.  306 has been deprecated.  303 and 307 are the normal redirects.

 

by: Bozzie4Posted on 2004-05-19 at 07:41:24ID: 11108291

OK, thanks all of you, I really hoped someone to come up with a wonder solution (because I think using the HTTP headers would be a very nice solution for redirecting - I really am too lazy to write an agent :-) )

But it's la dolce Italia for me now - 3 weeks well-earned (or whatever) holiday ... yey.

cheers,

Tom

 

by: qwaleteePosted on 2004-05-20 at 09:15:36ID: 11118723

Unfortunately, the response code is not considered a standard header...

HTTP/1.1 200 Document follows
Server: Lotus-Domino/5.0.7
Date: Thu, 20 May 2004 16:07:10 GMT
Connection: close
Accept-Ranges: bytes
Vary: *
Content-Location: vpn.html
Content-Type: text/html
Content-Length: 10663
Last-Modified: Wed, 14 Apr 2004 18:01:00 GMT

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

The response code is merely the second word of the first line of the response.  It would indeed be nice if there was still some way to set that.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...