Redirects that include a query string

I have three old URIs for which I wish to return 301 redirects back to the client:
http://xyz.com/page.jsp?type=a
http://xyz.com/page.jsp?type=b
http://xyz.com/page.jspI would like them to respectively send redirects to these URIs:
http://xyz.com/pageA.jsp
http://xyz.com/pageB.jsp
http://xyz.com/anypage.jspI added NameTrans rules to my obj.conf as follows:
NameTrans fn="redirect" from="/page.jsp?type=a" url="/pageA.jsp" status="301"
NameTrans fn="redirect" from="/page.jsp?type=b" url="/pageB.jsp" status="301"
NameTrans fn="redirect" from="/page.jsp" url="/anypage.jsp" status="301"However, after making this change and restarting my server, it appears as though the query string is being ignored, as any of the original three URIs is redirected to /anypage.jsp - why is that?
Is there some other way to achieve this short of manually replacing all of the original jsp files with new ones that send a redirect to the desired page?
Thanks,
Bill

A more versatile way of doing this would be to use the regular expression matching and backreferences:
<If defined $query
    and $query =~ "type=(.*)" >
    NameTrans fn="redirect" uri="$urlhost/page$1.jsp"
</If>This will catch any query string contains type=VALUE and redirect that to host/pageVALUE.jsp . This allows you to have just one if stanza rather than requiring a new if stanza for each possible match (which, while it works, can quickly grow into a nightmare for a sysadmin to have to manage).

Similar Messages

  • IIS Webgate losing connection to OAM server with query string in URI

    Hi,
    We have a Windows 2008 server with IIS 7/7.5 and the OAM 10.1.4.3 webgate installed on it, and are having a problem where it appears that during the processing of a request, the webgate is getting an ErrEngineDown (i.e., the webgate thinks that it's lost connection to the OAM server).
    We have a number of similarly configured IIS servers + webgates that work fine, but this problem is only occurring on one of the IIS servers, AND it appears that this only happens when the URI being requested includes a query string.
    When this happens, we see the following in the webgate oblog.log file:
    2012/10/08@16:45:10.244000     3148     2928     CONN_MGMT     DEBUG1     0x00000201     ..\src\aaa_service_client.cpp:935     "Simulating engine down reply"     
    and:
    2012/10/08@16:45:10.244000     3148     3220     WEB     TRACE     0x00000203     ..\src\iis_filt_info.cpp:554     "Function entered"     _TraceName^ObIISFiltPreprocHdrs::RedirectTo     redirectUrl^/access/oblix/apps/webgate/bin/webgate.dll?status%253D500%2520errmsg%253DErrEngineDown     
    and:
    2012/10/08@16:45:10.244000     3148     3220     ACCESS_CLIENT     DEBUG3     0x00000201     ..\src\aaa_service_client.cpp:3359     "ObAAAServiceClient::DecNumActiveReferences"     _numActiveReferences^0     AAA Client Address^0x02139730     
    2012/10/08@16:45:10.244000     3148     3220     ACCESS_SDK     ERROR     0x00000501     ..\src\obuser_session.cpp:1564     "ObError exception caught"     raw_code^124     
    We've confirmed that the IIS server connectivity to the OAM server is fine.
    When they test, they get the OAM FORM login page, then then enter the username and password, and then the browser shows an "Oracle Access Manager Operation Error" webpage (which probably corresponds to that "ErrEnginedown".
    The puzzling thing is why this would happen but only if the URI includes a query string. Also, as I mentioned, we are only seeing this problem with one IIS server (+webgate).
    We have an SR with Oracle, but that hasn't made much progress, so I was wondering if anyone has encountered something like this?
    Thanks,
    Jim

    Hi,
    It turned out that there were some application errors that were occurring and when those were fixed, this problem disappeared. We don't control the IIS application, so we're not 100% what the problems were.
    Jim

  • Receiver HTTP Adapter Dynamic Query String

    Hello,
    I am using HTTP Adapter on receiver side.
    My URL is  <b>http://server:port/abc/def?xyz=123&luw=345</b>
    When I am using Adapter specific attributes.
    If I check apply Parameters and pass
    Parameter 1 as xyz and Parameter 2 as luw and pass their values through dynamic configuration will they get appended to the dynamic querystring
    http://server:port/abc/def at the end and I get back the complete URL.
    Can this be achieved? I am stuck on this.
    Regards,

    Srihari,
    The best way to debug this and check what is happening would be to use the TCP gateway tool as shown in this blog by Stefan Grube.
    /people/stefan.grube/blog/2007/03/29/troubleshooting-soap-http-and-mail-adapter-scenarios-with-tcpgateway
    Send the request to the TCP gateway and forward it from there to the correspionding target.
    You will be able to see the URL being passed including the Query String parameters.
    Regards
    Bhavesh

  • Page not cached because "URL contains query string"

    I have used JDeveloper to produce a search/display page using ADF where the user enters search criteria and then presses a Search command button. The parameters are POSTed to the webserver, and I need to devise a cache rule to cache pages using the entered search criteria so that another seach for the same values can be served from the cache.
    I have created a rule that will cache GET, GET with Query String and POST.
    I have put .* in the POST body. When I do this, the first query page is retrieved from the origin server and cached and resulting queries with different search criteria are returned the data for that first search (ie. it's not taking into account the search parameters).
    If I switch off that rule and look at what's being received, I see the following:
    /158.234.27.10:8889/BM/faces/physical.jsp POST;;;event=&form1:selectOneChoice1=0&form1:selectOneChoice2=&form1:selectedDate=2004-08-10&form1:table1:rangeStart=0&form1:table2:rangeStart=0&form1:table3:rangeStart=0&form1:table4:rangeStart=0&form1:table5:rangeStart=0&form1:table6:rangeStart=0&oracle.adf.faces.FORM=form1&oracle.adf.faces.STATE_TOKEN=3&source=form1:commandButton1;;
    Now, there are 3 search parameter fields that need to be considered - the others should be ignored:
    form1:selectOneChoice1
    form1:selectOneChoice
    form1:selectedDate
    It's not clear to me where (and how - in what format) I specify parameters to ignore and parameters to consider. I have tried listing these 3 parameters in the URL parameters table for the Rule (I did not specify a value - should I have done?) but when I do this, the page is not cached and shows the reason for this is that "URL Contains Query String".
    Can someone explain how to specify important POST body parameters and unimportant POST body parameters?
    Thanks,
    Andy

    Hi,
    Please go through this:
    http://download-west.oracle.com/docs/cd/B14099_02/caching.1012/b14046/cache.htm#sthref1530
    Hope it helps you. I think you should be able to configure the intended rule in Web Cache.
    Regards,
    Priyanka GES

  • How do I add a record's primary key to a query string and add that to an .xml catalog?

    Hello everyone,
    I am using Dreamweaver CS3 on a MacBook Pro Leopard 10.5.6 and MAMP 1.7. I am also teaching myself how to work with PHP and MySQL, using David Powers book The Essential Guide to Dreamweaver CS3.
    I am trying to create a wedding photography web site, with a personal page after login, which will display the photographs of the customers wedding.
    The same page will also be a catalog/shopping cart, so the customer can choose which photo's they want, and pay for them. (I am aware that there are instructions in The Essential Guide in chapter 15 page 515, on how to redirect to a personal page, but it doesn't fully cover what I am asking).
    I have already created the login success page, which greets users by name, as per the instructions in The Essential Guide. I have also created a catalog page. However my catalog page is not calling information from the database, instead it is taking information from an XML page using PHP.
    I would like to insert a list menu on the login success page, which lists the customers name, and when they select their name they will then select a link that will take them to a personal page with just their wedding photographs.
    I am unsure of how to pass the customer_id, in what will be the username list menu, to the page which will contain the customers set of wedding images.
    Is it the same process used in chapter 14 where you add a record's primary key to a query string?
    I am asking because when I set up a recordset from the MySQL database it lists the images as witten names not actual images, I have tried calling the images with PHP code but it just doesn't work.
    The catalog page I have set up at the moment is not calling the images from the database, but directly from the image folder.
    Is what I am trying to do possible?
    If so how do I pass the customer_id and username to a recordset and link that recordset to the xml catalog so the customers personal wedding images are displayed on the catalog page for the shopping cart?  I need step by step instructions, or maybe a link to a good tutorial.
    Can somebody help me please?
    Thankyou.

    QuickTime 7 can set the poster frame, but I've not had much success with it. This is what QuickTime 7 Help says about this topic:
    +A "poster frame" is a still image of a movie that represents the movie in places like the Finder. The default poster frame is the first frame in the movie. You can change the poster frame.+
    +To change a movie's poster frame:+
    +In QuickTime Player 7, drag the playhead (or use the arrow keys to move the playhead) to the desired frame.+
    +Choose View > Set Poster Frame.+
    +To view a movie's poster frame, choose View > "Go to Poster Frame."+
    If you don't have QuickTime 7 (version 7.6.6) it can be installed from your Snow Leopard disc using a custom install. Otherwise download it from this Apple site: http://support.apple.com/kb/DL923
    John

  • Include XML payload as URL query string

    Hello Gurus -
    I have a business requirement that I'm hoping you all can help me with:
    Scenario: Send XML message from SAP XI to a third party system via the Receiver Plain HTTP Adapter
    I need to include the actual XML message as a query string in the target URL at the time of posting. The content of the XML message is determined within XI message mapping and will not be known until runtime, so the URL determination will need to be dynamic.
    For example - a target URL with the "xmldata=" query string:
    http://server01/receiver.asp?xmldata=<?xml version="1.0" encoding="UTF-8"?><headertag><tag1><value1></tag1></headertag>
    Does anyone know how to do this - Is there some communication channel configuration and/or programming that would work?
    Thanks to all!
    Chad

    Hi,
    This is very similar to our scenario. By manipulating some of the Plain HTTP Adapter parameters, my colleague was able to post using xmldata. He set content type to text/plain then set the prolog to xmldata=. Let me know if this worked.
    Regards

  • Jsp:forward param not getting included in my query string

    Hi,
    On a particular JSP page, mine.jsp, I am forwarding to a servlet ...
    <jsp:useBean id="HotelResortDBBean" class="com.lvcva.database.HotelResortDBBean" scope="request" />
    <jsp:forward page="/meetings/meeting-venues/results">
         <jsp:param name="sqftRange" value="${empty param.meetingsqft ? -1 : param.meetingsqft}" />
    </jsp:forward>This forwards to a servlet, when I query "request.getQueryString", it comes up null. However, when I enter the URL, "mine.jsp?sqftRange=-1", the query string returns "sqftRange=-1" as expected. Can someone tell me what I'm doing wrong in the above that is causing the jsp:param to not be added to the query string?
    - Dave

    a forward does not create a new request, and thus the query string is not altered. If you want the query string to change, use a redirect in stead.
    note: even though the query string does not change, the new parameter IS added to the HttpServletRequest object, so you can still fetch the new parameter from it even with the forward.

  • _layouts/Authenticate.aspx losing Query String Parameters in redirection

    Hi,
    we are losing query strings when _layouts/Authenticate.aspx redirects to a application page after user authentication.
    Example shown below
    http Request is shown below
    /_layouts/Authenticate.aspx?Source=http://ourwebsite.com/somepage.aspx?paramapp=testapp&paramdata=testdata
    redirection happens fine, but all the query string expect the first gets truncated.
    In the above the example paramdata gets truncated

    Hi Chandan, 
    please have a check if should this situation applied, i just talked with my colleague regarding this,
    if you are using OOB, there are a set on AAM that may not eligible to do so, for example there is an encoding feature on it, sharepoint by design may not able to receive this because security concern.
    "When the AAM redirect is configured requests for data that doesn't exist in the local farm is directed to another farm.  If this request contains a query string, the query string is dropped"
    Regards,
    Aries
    Microsoft Online Community Support
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • How to create an explain plan with rowsource statistics for a complex query that include multiple table joins ?

    1. How to create an explain plan with rowsource statistics for a complex query that include multiple table joins ?
    When multiple tables are involved , and the actual number of rows returned is more than what the explain plan tells. How can I find out what change is needed  in the stat plan  ?
    2. Does rowsource statistics gives some kind of  understanding of Extended stats ?

    You can get Row Source Statistics only *after* the SQL has been executed.  An Explain Plan midway cannot give you row source statistics.
    To get row source statistics either set STATISTICS_LEVEL='ALL'  in the session that executes theSQL OR use the Hint "gather_plan_statistics"  in the SQL being executed.
    Then use dbms_xplan.display_cursor
    Hemant K Chitale

  • Keeping query strings despite an automatic 302 redirect

    is there anyway for a query string to persist despite an automatic 302 redirect by the server??
    for instance if my site has a 'tmp' directory and i want to pass a parameter to the index page in 'tmp'
    ... but I go to
    http://www.mysite.com/tmp?qvar=something
    in a browser, the server will automatically do a 302 redirect to
    http://www.mysite.com/tmp/
    so the query string variable is lost.
    i thought about having a filter run, to pick off the query string variable before the redirect, but the filter will only run after the redirect happens.
    any insight would be great.
    thanks.

    This might help: http://www.mail-archive.com/[email protected]/msg00353.html

  • How to get the original query string in an event receiver when dialogs are enabled

    I have scenario where I am adding a document to a document library which has an external data column on it. My goal for this column is to have it automatically populated with an appropriate value based on original query string to the page. The general
    idea is that I am on a custom page that has various webparts on it including a view of my document library that is context sensative based on the query string, and I want to use that context sensitivity not just to filter the list but also when adding documents.
    I have been searching around for solutions to this problem all day and have gotten this far:
    I have an event receiver attached to my document library that handles the ItemAdded event syncronously (as such I have the new list item available to me). In that event receiver I am able to set the column values as required. Where I am stuck is on getting
    the value from the query string that I need to actually set as the column value.
    Based on:
    http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/8cfcb299-9a55-4139-86ec-0b53b2922a54 and several similar articles/posts I have been able to get the original source Url with the query string I want via the following
    code in my event receiver:
    private HttpContext context;
    public EventReceiver1()
    context = HttpContext.Current;
    public override void ItemAdded(SPItemEventProperties properties)
    var originalQueryString = context.Request.QueryString["Source"];
    // Parse the query string and use the value ...
    The problem is that this solution breaks down if the dialogs are turned on under the advanced settings for the list. The reason the solution fails is because the "Source" query string parameter goes away and is replaced by "IsDlg" set to a value of "1".
    Does anyone know how to get past this hurdle? Any help would be greatly appreciated.

    Hi Stuart,
    The reason I'm looking for "Source" in the query string is because that is something I found to be reliable when the Dialogs are turned off. I've dug around pretty deep in the Request object to see if anything had the data I was looking for and unfortunately
    it doesn't appear to be there. The
    context.Request.QUeryString.ToString()
    returns a rather simple one of:
    List=%7b43ECDCB0-8440-4652-B067-AA20481779D7%7d&RootFolder=&IsDlg=1
    and the
    context.Request.UrlReferrer.Query.ToString()
    has the same value.
    I suspect this is due to the dual step process that takes place in adding an item to a document library where the first modal popup (which I suspect likely has the information I need) gives you the opportunity to browse to your file and then the second
    dialog (maybe this is getting brought up as a result of another request which is now referring back to the original request that brought up the first dialog?) where you edit your properties.
    Thanks for the try though, if you've got anything else I'd love to hear it.

  • How to look at a query string from Nav Bar Find Mode

    I would like to view the resultant query string from the Navigavtion Bar's Find Mode. I am using a Master/Detail and am querying with the selection criteria from the detail only.
    I am getting unexpected results, and would just like to SEE what the query string IS.
    Thanks

    I am getting unexpected results, and would just like to SEE what the query string IS.Run your app with diagnostic output turned on. Here's the instructions for that.
    To turn on diagnostic, go to the IDE,
    1. Select the project.
    2. Do right mouse click and select "Project Settings..."
    3. On the Settings dialog, select Configurations/Runner.
    4. In the righthand side pane, you should see a textbox for "Java
    Options". Please add the following JVM switch:
    -Djbo.debugoutput=console
    Then, rerun. The run command should include
    -Djbo.debugoutput=console as in
    "D:\JDev9i\jdk\bin\javaw.exe" -Djbo.debugoutput=console -classpath ...
    You should now see a lot more output on the IDE's message window.
    This should also include the findmode query that gets built after you hit the execute button from a findmode panel.

  • Invalid column name in query string - using Format function

    In my post just before this one the problem was solved for writing a query string using a date range. The rest of the query string includes the same date field (Call_Date) but formatted as 'MMM-YY'. I get an invalid column name error when I add this field to the query string. Here is the rest of the query string:
    strSql = "SELECT Format(CALL_DATE,'mmm-yy'), " _
    & "HOME_REGION FROM CCC2.CASE_EPRP " _
    & "WHERE (HOME_REGION = 'NCR') AND " _
    "(CALL_DATE >= to_date( '1/1/2002', 'MM/DD/YYYY' )" _
    & "AND CALL_DATE <= to_date( '2/28/2003', 'MM/DD/YYYY' ))"
    In the Access Query tool I can include this field
    Format(CALL_DATE,'mmm-yy')
    and the query runs fine (I just need to make it dynamic using ADO). But in my ADO query string above, I get the invalid column name error. Is there a way I can include
    Format(CALL_DATE,'mmm-yy')
    in my ADO query string? I appologize for not being more familiar with Oracle Sql. Any help greatly appreciated.
    Thanks again,
    Rich

    Thank you very much for your reply. I think I'm getting closer to the solution. Just I got an error message
    "date format not recognized"
    when I add "to_char( call_date, 'mmm-yy' )" to the query string. I tried using all uppercase, but that did not make a difference. Do I need to use to_date inside the to_char maybe?
    to_char(to_date(call_date, 'mmm/yy'), 'mmm-yy')
    Thanks again for your help.
    Rich

  • Passing Flash Vars Through Query Strings and JS

    I'm trying to get a particular video to play in a flash ad
    when a particular query string is clicked. I can't get it to work
    and would appreciate any help that you can provide. The ad plays
    but the movies don't show when the query string is clicked or when
    you click on objects in the movie that are supposed to populate a
    movie. Here's the code I've been trying to use:

    Thanks for the advice, I have tried Javascript to resolve the
    problem. In response to the <object> tag missing, There is
    one I just included a snippet of the html code sorry for the
    confusion. Due to deadlines I abandoned the functionality of the
    script and "dumbed" down the script. Thank you again for the help

  • Dealing with invalid query strings

    I have created a mysql/php site with master and product detail pages. The product details are filtered via a url query string
    e.g. domain/proddetail.php?productID=38
    This all works fine except for the case when a product is deleted and the productID is no longer valid. Because Google continues to index these pages vsitors then get a page displaying no data .
    How do I gracefully deal with these invalid productIDs? Preferbly I want to redirect to a error404 page so that Gogle delists but simply displaying a product not found notice would be better than nothing.
    Thanks

    In your proddetail.php page, test the recordset rowcount - if it is zero, redirect to your 404 page.

Maybe you are looking for

  • Create subscription not having the correct created by user name and date

    Last week we upgraded our system to SP14 from SP11. When a user creates a new document request from a template (refer attachment-screen shots), subscription notification is sent with the wrong created by user name & date. Instead of showing the user

  • No sample in BOE 3.0

    HI, I have installed BO XI 3.0 on windows. Everything is working fine. But I do not see sample universes and reports That we do  we XI R2 after installation. Do we need to add it manually or any other way. Any pointer would be very helpful --Kuldeep

  • Cisco Prime Infrastructure 2.0 cannot establish connectiont with WLC5508 7.4.110

    I have two wlc 5508 in HA with image version 7.4.110. These two WLC are connected on two 6509 Catalyst Switch VSS system. On the WLC the LAG are enabled for the connection to the VSS. When i am trying to add the WLC to PI 2  once is succsessful. The

  • Inner Classes doubts

    Hi All, I am trying to learn Inner classes in Java. I am referring to the book Core Java by Horstmann and Cornell. I know that there are various types of inner classes namely: - Nested Inner classes - Local Inner classes - Annonymous Inner classes -

  • C4780 WPS:Time Out

    Hi all, I was searching around and reading several threads but didn't find a solution. I apologize if I overlooked something. I want to connect my Photosmart c4780 to my wireless router, TP-Link WR1043N, which uses WPA2. There is no mac filtering or