Adding a Missing & in a URL

I have some URLs with missing &s between variables in the query string.  I've fixed the issue that created these bad links, but a bunch of the pages are still in the search engines.  I would like to setup a 301 for these so that they end up going to the right place, but none of the things that I've tried works.   I've tried all of the options below (both with [0-9]+ and with a specific number) and nothing seems to work.  Any suggestions? 
I need them to use the [0-9]+ because this is just an example of the issue... there are lots of numbers involved and several different surrounding variables.
<cfif find("[0-9]+reports",cgi.script_name)>
<cfset errorstring = reReplaceNoCase(cgi.query_string, "[0-9]+reports", "&reports")>
<cfoutput>
<cfheader statuscode="301" statustext="Moved Permanently">
<cfheader name="Location" value="#cgi.script_name#?#errorstring#">
<cfabort>
</cfoutput>
</cfif>
<cfif isDefined("[0-9]+reports")>
<cfset errorstring = reReplaceNoCase(cgi.query_string, "[0-9]+reports", "&reports")>
<cfoutput>
<cfheader statuscode="301" statustext="Moved Permanently">
<cfheader name="Location" value="#cgi.script_name#?#errorstring#">
<cfabort>
</cfoutput>
</cfif>
<cfif StructKeyExists(url,'2reports')>
<cfset errorstring = reReplaceNoCase(cgi.query_string, "2reports", "&reports")>
<cfoutput>
<cfheader statuscode="301" statustext="Moved Permanently">
<cfheader name="Location" value="#cgi.script_name#?#errorstring#">
<cfabort>
</cfoutput>
</cfif>

I should have writting:
<cfif find("2reports",cgi.query_string)>
<cfset errorstring = reReplaceNoCase(cgi.query_string, "2reports", "&reports")>
<cfoutput>
<cfheader statuscode="301" statustext="Moved Permanently">
<cfheader name="Location" value="#cgi.script_name#?#errorstring#">
<cfabort>
</cfoutput>

Similar Messages

  • Missing Message Attributes: URL/HTTP Destination

    Hello,
    following scenario:
    There is a sync. interface between SAP PI ante the Paypal API within the HTTP adapter calling a dynamic URL.
    The dynamic URL is created as mentioned in this blog: http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/7264. [original link is broken]
    Also the HTTP adapter is configured as described (Adapter Specific Message Attributes and URL are flagged).
    Following error occours when testing the call:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="PLAINHTTP_ADAPTER">ATTRIBUTE_MISSING_URL</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:Stack>Dynamic Header - Missing Message Attributes: URL/HTTP Destination</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Is there sth. special I have to consider in the HTTP Adapter?
    Thanks in advance,
    André

    Hi Michal,
    I´m passing the URL to the attribut "TargetURL" by using a UDF in my mapping.
    In the adapter I have flagged "URL".
    So the value of TargetURL set in mapping shoul be used as destination in the adapter.
    Please have a look onto my UDF used in MM:
    http://img408.imageshack.us/i/udf.jpg/
    Adapter settings:
    http://img691.imageshack.us/i/adaptersetting1.jpg/
    http://img339.imageshack.us/i/adaptersetting2.jpg/
    How can I check that the TargetURL is successfully set as a dynamic parameter?
    Thanks,
    André

  • [svn:osmf:] 14905: Adding file missing from previous commit.

    Revision: 14905
    Revision: 14905
    Author:   [email protected]
    Date:     2010-03-22 05:37:59 -0700 (Mon, 22 Mar 2010)
    Log Message:
    Adding file missing from previous commit.
    Added Paths:
        osmf/trunk/apps/samples/framework/OSMFPlayer/src/assets/fonts/
        osmf/trunk/apps/samples/framework/OSMFPlayer/src/assets/fonts/Standard0755.swf
        osmf/trunk/apps/samples/framework/OSMFPlayer/src/assets/fonts/readme.txt

    If you're confident that the DP contains the new file, try deleting the deployment and re-doing it (not the deployment type - just the deployment to your test collection).
    Gerry Hampson | Blog:
    www.gerryhampsoncm.blogspot.ie | LinkedIn:
    Gerry Hampson | Twitter:
    @gerryhampson

  • [svn:osmf:] 14904: Adding file missing from previous commit.

    Revision: 14904
    Revision: 14904
    Author:   [email protected]
    Date:     2010-03-22 05:32:49 -0700 (Mon, 22 Mar 2010)
    Log Message:
    Adding file missing from previous commit.
    Added Paths:
        osmf/trunk/libs/ChromeLibrary/org/osmf/chrome/hint/
        osmf/trunk/libs/ChromeLibrary/org/osmf/chrome/hint/Hint.as

    If you're confident that the DP contains the new file, try deleting the deployment and re-doing it (not the deployment type - just the deployment to your test collection).
    Gerry Hampson | Blog:
    www.gerryhampsoncm.blogspot.ie | LinkedIn:
    Gerry Hampson | Twitter:
    @gerryhampson

  • [svn:osmf:] 10540: Adding file missing from previous commit.

    Revision: 10540
    Author:   [email protected]
    Date:     2009-09-23 11:39:41 -0700 (Wed, 23 Sep 2009)
    Log Message:
    Adding file missing from previous commit.
    Added Paths:
        osmf/trunk/framework/MediaFrameworkFlexTest/org/openvideoplayer/gateways/TestHTMLGateway. as

    If you're confident that the DP contains the new file, try deleting the deployment and re-doing it (not the deployment type - just the deployment to your test collection).
    Gerry Hampson | Blog:
    www.gerryhampsoncm.blogspot.ie | LinkedIn:
    Gerry Hampson | Twitter:
    @gerryhampson

  • [svn:osmf:] 13000: Adding the missing readme file for the captioning sample app.

    Revision: 13000
    Revision: 13000
    Author:   [email protected]
    Date:     2009-12-16 10:36:36 -0800 (Wed, 16 Dec 2009)
    Log Message:
    Adding the missing readme file for the captioning sample app.
    Added Paths:
        osmf/trunk/apps/samples/plugins/CaptioningSample/readme.txt

    Carey,
    I have tried london1a1's workaround, and it has not made any difference.
    It seems that london1a1 suggests changing the Camera.h file in this location:
              Users/london1a1/Documents/DW_NAF/PhoneGapLib/PhoneGapLib/Classes/Camera.h
    Whereas you're saying to change the Camera.h file in this location:
              /Applications/Adobe Dreamweaver CS5.5/Configuration/NativeAppFramework/DWPhoneGap/iphone/PhoneGapLib/Classes/Camera.h
    I've tried changing the Camera.h file in both locations.  Neither has made a difference.

  • [svn:osmf:] 10670: Adding a missing file.

    Revision: 10670
    Author:   [email protected]
    Date:     2009-09-29 01:44:20 -0700 (Tue, 29 Sep 2009)
    Log Message:
    Adding a missing file.
    Added Paths:
        osmf/trunk/plugins/MASTPluginIntegrationTest/src/org/openvideoplayer/test/mast/loader/
        osmf/trunk/plugins/MASTPluginIntegrationTest/src/org/openvideoplayer/test/mast/loader/Tes tMASTLoader.as

  • [svn:osmf:] 10136: Adding a missing file.

    Revision: 10136
    Author:   [email protected]
    Date:     2009-09-10 15:38:55 -0700 (Thu, 10 Sep 2009)
    Log Message:
    Adding a missing file.
    Added Paths:
        osmf/branches/briggs-prototype/libs/VAST/org/openvideoplayer/vast/model/VASTDocument.as

  • [svn:osmf:] 10584: Adding a missing file from that last folder structure refactor.

    Revision: 10584
    Author:   [email protected]
    Date:     2009-09-24 17:19:48 -0700 (Thu, 24 Sep 2009)
    Log Message:
    Adding a missing file from that last folder structure refactor.
    Added Paths:
        osmf/trunk/plugins/akamai/AkamaiBasicStreamingPlugin/AkamaiBasicStreamingPlugin.as

    Hello,
    Welcome to MSDN forum.
    I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
    the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
    and Visual Studio Editor.
    Because your issue is about ASP.NET web application development, I suggest that you can consult your issue on ASP.NET forum:
    http://forums.asp.net/
     for better solution and support.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • [svn:osmf:] 13186: Adding files missing from previous commit.

    Revision: 13186
    Revision: 13186
    Author:   [email protected]
    Date:     2009-12-23 05:26:07 -0800 (Wed, 23 Dec 2009)
    Log Message:
    Adding files missing from previous commit.
    Added Paths:
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityAuto_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityAuto_down.png
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityAuto_up.png
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityManual_disabled.png
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityManual_down.png
        osmf/trunk/libs/ChromeLibrary/assets/images/qualityManual_up.png

    I just checked my original file and it is 30fps...
    Also other clips from the same camera were correctly finalized, just this one clip "disappeared".
    Any ideas anyone?
    Thanks.

  • [svn:fx-trunk] 11042: Attempt to fix build by adding the missing IMEClient. as from today's TLF Build 531.

    Revision: 11042
    Author:   [email protected]
    Date:     2009-10-20 18:51:09 -0700 (Tue, 20 Oct 2009)
    Log Message:
    Attempt to fix build by adding the missing IMEClient.as from today's TLF Build 531.
    QE notes: N/A
    Doc notes: N/A
    Bugs: N/A
    Reviewer: N/A
    Tests run: Checkintests
    Is noteworthy for integration: No
    Added Paths:
        flex/sdk/trunk/frameworks/projects/textLayout/textLayout_edit/src/flashx/textLayout/edit/ IMEClient.as

    This is a well known and longstanding issue: going back to at least the 3.7.xx series kernels (UEFI booting). You can search the boards for the various threads dedicated to this (class of) bug{,s}.

  • Name of .crl and .crt file missing from HTTP URL in certificate details

    Hello Everyone,
    I am in the process of building a 2-tier Windows Server 2012 R2 PKI. The CA name of both the offline standalone root CA and enterprise subordinate CA have spaces in it (we'll call the CA name, 'Test Lab Root CA' for point of reference).
    When I submitted the certificate request for the subordinate CA to the root CA and viewed the attributes/extensions of the pending request, I noticed the HTTP URL is missing the name of the .crt and .crl file.
    The AIA extension reads URL=http://test.domainname.com/pki/.crt
    in the issued certificate details.
    The CDP extension reads URL=http://test.domainname.com/pki/.crl
    in the issued certificate details.
    The AIA and CDP location HTTP URLs are configured as http://test.domainname.com/pki/<CertificateName>.crt and  http://test.domainname.com/pki/<CRLNameSuffix><DeltaCRLAllowed>.crl, respectively on the
    root CA. 
    The LDAP URL shows the .crt and .crl file name (with %20 replacing the spaces) perfectly fine. The LDAP URL is configured using variables as well. It's just the HTTP URL that is missing the name of the file altogether. 
    I have read about the issue where spaces are not being replaced with %20 in the URL on Windows Server 2012 and a hotfix is available for that issue. But this issue seems to be slightly different and I'm running Windows Server 2012 R2. I tried installing
    the hotfix to see if it would help, but the hotfix can't install because it doesn't apply to Server 2012 R2.
    I've been trying to find a technet discussion or blog article for a week to see if anyone has seen this and what the fix is, but I'm coming up empty. I only find talks about %20 not replacing the space in the name.
    Does anyone have any insight to my particular issue? I don't want to issue the subordinate CA certificate until I know the HTTP URL populates the CRL and CRT file name correctly. I can get around this by typing out the name of the file (with spaces and not
    %20... e.g. http://test.domainname.com/pki/Test Lab Root CA.crl) in the URL via the registry and the URL displays the name of the file (with %20 in the name) when I do another certificate request and check the attributes/extensions in the
    pending request. However, I prefer to avoid manually typing out the name of the file in the registry. I'd like to use the variables if at all possible. 
    Any help/guidance would be greatly appreciated.
    Thank you.

    On Fri, 27 Mar 2015 03:42:28 +0000, Brian Komar [MVP] wrote:
    You have totally messed up the URLs.
    If you run certutil -getreg ca\CRLPublicationURLs and certutil -getreg ca\CACertPublicationURLs, you will see that you do not have correct use of variables when compared to the settings that follow:
    The URLs should be set to the following for an offline CA:
    certutil -setreg CA\CRLPublicationURLs "1:%WINDIR%\system32\CertSrv\CertEnroll\%%3%%8%%9.crl\n2:http://test.domainname.com/pki/%%3%%8%%9.crl"
    *certutil -setreg CA\CACertPublicationURLs  "1:%WINDIR%\system32\CertSrv\CertEnroll\%%1_%%3%%4.crt\n2:http://*test.domainname.com*/pki/%%1_%%3%%4.crt"*
    For an issuing CA, they should be set to:
    The URLs should be set to the following for an offline CA:*certutil -setreg CA\CRLPublicationURLs "65:%WINDIR%\system32\CertSrv\CertEnroll\%%3%%8%%9.crl\n6:http://test.domainname.com/pki/%%3%%8%%9.crl"*
    *certutil -setreg CA\CACertPublicationURLs  "1:%WINDIR%\system32\CertSrv\CertEnroll\%%1_%%3%%4.crt\n2:http://**test.domainname.com**/pki/%%1_%%3%%4.crt"*
    Just a clarification here, if you're running the above certutil commands at
    the command prompt you only need single % characters in the command line.
    The double % characters are only required if the commands are being run in
    a batch file.
    Paul Adare - FIM CM MVP

  • Newly Added Topics Missing From steve o'hearn Exam Guide (1Z0-047)

    Hi,
    I am planning to take exam 1Z0-047.
    I got to se the exam guide for this,(OCA Oracle Database SQL Certified Expert Exam Guide (Exam 1Z0-047)) by Steve o'hearn in market.
    But it seems that syllabus of the exam is modified on 15th september 2014; and newly added topics are NOT present in the exam guide.
    Below are the objectives and topics I feel are missing from the book.
    Restricting and Sorting Data
    Use the SQL row limiting clause**
    Create queries using the PIVOT and UNPIVOT clause**
    Use pattern matching to recognize patterns across multiple rows in a table**
    Displaying Data from Multiple Tables
    Use the cross_outer_apply_clause**
    Using Subqueries to Solve Queries
    Create a lateral inline view in a query**
    Using DDL Statements to Create and Manage Tables
    Truncate tables, and recursively truncate child tables**
    Use 12c enhancements to the DEFAULT clause, invisible columns, virtual columns and identity columns in table creation/alteration**
    Manipulating Large Data Sets
    Use explicit default values in INSERT and UPDATE statements**
    We can find material on these topicsover internet(in fact I have actually worked on few of these topics already as part of my job.)
    But i prefer referring to book as it helps to understand the scope.
    I just joined the oracle forums,and not sure if I am placing this discussion on correct forum/category.
    A humble request to advice if it is at wroing place.

    I am just thinking what next course should I take ?
    Immediate target will be obviously  some PL SQL related test like 1Z0-147.
    BUT what to do after that ?
    In my work experinece so far, I have worked as a developer, senior developer(mainly in maintenace projects , both OLTP and OLAP projects I have worked for.
    that is, small as well as relatively big data volumes.Right from simple DB to DW systems of big enterprise corporation where millions of transactions happen and enter into system each day). I have  also participated in database designing when I worked on project where database was being designed from scratch. so, I am aiming/aspiring for a role something like Designer  or architect roles in the long run.
    I'm glad you found my page useful. I actually recommend 1Z0-144 over 1Z0-147.  The two exams are equivalent in their results, but I feel 144 is the better exam.  Also, 147 was almost retired at one point.  OU backed off, but may put it back on the chopping block at any time.  I wrote an article explaining why I prefer 144 here:
    Oracle PL/SQL Developer Certification: 1Z0-147 or 1Z0-144?
    As to the step after that, 1Z0-146 is the obvious one to gain the PL/SQL OCP.  147/144 will only gain the OCA-level cert.
    If you want to end up as a designer or architect, eventually you must get into database design, which would argue pursuing the DBA track.
    Millions of transactions implies a significant requirement for performance tuning which would argue for the SQL Tuning (1Z0-117) or performance certifications (1Z0-054/1Z0-064).

  • IPhone 6 photos in Recently Added but missing from Collections

    I recently received 3 photos in a text message which I have saved to my phone.
    The 3 pictures appear fine in the Recently Added album, but when I go to find the photos in the Photos/Collections tab, only 2 of the photos appear. The 3rd one is missing. I have saved the 3rd photo a number of times, but it still doesn't appear. All 3 photos were taken at the same time on a relatives phone and sent to me all at the same time, so should all be dated the same.
    As a result of not appearing in the Photos tab, the 3rd photo also doesn't sync to iCloud.
    Anyone experienced this? My main worry is that after the photos leave my Recently Added album in 30 days, the 3rd photo will be lost & I don't know if this could also be happening to other photos as well.

    Dunno about the photo not appearing in photos/collections.
    Try a reset of iPhone.
    Quit all open apps.
    Double tap Home & swipe up on all apps.
    Then reset iPhone.
    Press & hold both Home & Power until you see Apple logo.
    the hyph wrote:
    My main worry is that after the photos leave my Recently Added album in 30 days, the 3rd photo will be lost
    You should regularly sync you photos back to you computer.

  • Newly-added field  missing in the field catalog  for NR00

    I  am about to creat condition record for condition type NR00 free goods . I need to make some customizing to meet our requirement .So  I changed  the field catalog for the condition table by adding a new field BWAST  (purchasing document type) . After that I am going to creat a new condition table 501 with this newly-added field ,but I can't find the field in the right part for field catalog .
    Can you give me some advice ?   Thank you in advance.

    I 've got the answers ,  
    Note 21040 - Allowed Fields not appearing for condition table
    thaks

Maybe you are looking for