How do you redirect HTTP requests to HTTPS?

Update to my question:
My original question didn't include all of the complexity of what I'm trying to do.
I have a virtual server with two listening ports, 80 and 443. I have a certificate installed for port 443 and that works fine when I specifically type in https://myserver
I also have a reverse proxy setup for a URI- /myapp -> remoteserver.
I'd like to configure my webserver to do a redirect from /myapp to the URL https:/myserver/myapp
and then have the reverse proxy kick and send me over to my remote server.
Everything works fine if I browse to https://myserver/myapp. I just want for requests from http://myserver/myapp to be turned into https://myserver/myapp before the reverse proxy takes effect.
Any ideas?
Thanks-
Edited by: bisbell on Sep 13, 2010 12:16 PM

It would go into whichever obj.conf file is specified for this virtual server (probably <server>-obj.conf, but double-check your server.xml to be certain).
I tend to process redirects early in the obj.conf. I usually try to have them processed before the other NameTrans statements. Here's how I've done it with other kinds of conditionals:
<Object name=default>
<If $urlhost = "www.foo.baz.com">
NameTrans fn="redirect" from="/" url-prefix="http://foo.baz.com/"
</If>In my case someone had created published a link to my server with a FQDN that was incorrect. Since they had done it in printed material a fix for them was not trivial. To address the problem I created a DNS entry that matched their typo, and created the redirect here to bounce from the bad FQDN to the proper FQDN. You're doing basically the same thing, except you want to redirect accesses to a particular URI that are not SSL enable to the same URL with SSL.
Please note that I haven't checked any of the syntax I gave you in the prior post. I already see one typo (~= should be =~). The variables being evaluated should be checked for correctness too (e.g. security!="true" might in fact be something like "not defined $security").
Check the docs. :)

Similar Messages

  • How do you redirect the user to a custom page after the "Save" button is clicked?

    In SharePoint 2010, I could add the following code to a save button to redirect the user to a custom page.
    <input type="button" value="Submit" class="btnStyle" name="btnSave" onclick="javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={/SitePages/Thankyou.aspx}')}" />
    However, how do you do this for a save button in SharePoint Online? The code of a save button in SharePoint Online looks like
    <input type="button" value="Save" name="ctl00$ctl33$g_175de2e0_43c1_4005_bac5_0ab02439686f$ctl00$toolBarTbl$RightRptControls$ctl00$ctl00$diidIOSaveItem" onclick="if (!PreSaveItem()) return false;if (SPClientForms.ClientFormManager.SubmitClientForm('WPQ1')) return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$ctl33$g_175de2e0_43c1_4005_bac5_0ab02439686f$ctl00$toolBarTbl$RightRptControls$ctl00$ctl00$diidIOSaveItem&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, true;javascript: {ddwrt:GenFireServerEvent('__commit;__redirect={/SitePages/Thankyou.aspx}')}))" id="ctl00_ctl33_g_175de2e0_43c1_4005_bac5_0ab02439686f_ctl00_toolBarTbl_RightRptControls_ctl00_ctl00_diidIOSaveItem" accesskey="O" class="ms-ButtonHeightWidth" target="_self">

    Not exactly what you are asking for, but if you are creating the link then you could add "?Source=" to the URL.
    http://yourServer/sites/yourSite/Lists/TestList/NewForm.aspx?Source=/SitePages/Thankyou.aspx
    Mike Smith TechTrainingNotes.blogspot.com
    Books:
    SharePoint 2007 2010 Customization for the Site Owner,
    SharePoint 2010 Security for the Site Owner

  • HT202097 How do you delete friend requests?

    How do I delete friend requests on game centre? I can only see options for accept, ignore and report, and the ignore button does nothing.

    Why don't you just do a simple Google search???
    http://lmgtfy.com/?q=how+to+unfriend+on+facebook

  • How can I redirect a request for testing?

    There is no internet access on the development machine and I have written for testing purposes a servlet to simulate a web server that my app accesses.
    However I need a program or way of redirecting a (secure and non-secure) url request to the local host.
    i.e. the application calls either:
    http://www.thewebsite.com/foo?bar=1
    or
    https://secure.thewebsite.com/foo?bar=1
    which is then redirected to:
    http://localhost/thewebsite/foo?bar=1
    How can this be done?

    Hi, thanks for the replies. I thought about that
    (it's a windows machine) but there is still a couple
    of problems.
    1. I can't specify the sub-directory can I?No, but your webserver can prob. do that.
    2. I want to handle a secure request but have it also
    go to the same locationssl would have to go to ssl. But setting up ssl normally is not too hard.

  • How do you trap bad request exceptions

    Hi,
    Can anyone tell me how to catch an exception from the page flow request processor. I'd like to be able to trap requests to invalid .do and .jpf urls. I have exception handling in my Global.app, but that only seems to apply to exceptions generated by the page flow controller.
    At the moment I'm getting this magic html which I think is maybe hardcoded in one of the struts or workshop servlets?
    <html><head><title>Page Flow Error - Action Not Found</title></head>
    <body>
    <h1>Page Flow Error - Action Not Found</h1>
    <table border="1" cellspacing="0">
    <tr><td><b>Page Flow:</b></td><td>Global.app</td></tr>
    <tr><td><b>Action:</b></td><td>blah/something</td></tr>
    <tr><td><b>Form:</b></td><td>null</td></tr>
    </table>
    <span style="color:red">Unable to find action <b>blah/something</b>.</span>
    </body></html>
    thanks,
    laphroaig

    You can report a problem with a purchase as described on this page : http://support.apple.com/kb/HT1933
    There is this general feedback page for the iPad, but I think the above is probably better : http://www.apple.com/feedback/ipad.html

  • How do you redirect emails?

    My client is looking to redirect emails set up on their new website to corresponding emails on another of their websites. For example, emails sent to [email protected] are redirected to [email protected] and emails sent to [email protected] are redirected to [email protected]

    To forward your email address to another email address you need to log in to your webmail at http://mail.yourdomain.com and then go to Settings > Mail in the left side menu, then type in the email address you want to forward to inside Forwarding field and Save.
    Please see the following screenshot:

  • WCCP V2 Question (Redirect https)

    Hello all
    I have been successful in implementing wccp in my multiple vlan environment.
    Router is Cisco 2921
    G0/0 - Internet
    G0/1 - Squid Proxy
    G0/2 - Clients in multiple vlans
    Here is the config:
    ip wccp web-cache redirect-list 120
    interface GigabitEthernet0/2.1
    encapsulation dot1Q 3
    ip address 172.16.1.1 255.255.255.0
    ip wccp web-cache redirect in
    ip nat inside
    interface GigabitEthernet0/2.2
    encapsulation dot1Q 2
    ip address 172.16.2.1 255.255.255.0
    ip wccp web-cache redirect in
    ip nat inside
    interface GigabitEthernet0/2.3
    encapsulation dot1Q 3
    ip address 172.16.3.1 255.255.255.0
    ip wccp web-cache redirect in
    ip nat inside
    access-list 120 remark REDIRECTION_CRITERIA
    access-list 120 deny   ip host 192.168.1.2 any
    access-list 120 permit tcp 172.16.1.0 0.0.0.255 any eq www
    access-list 120 permit tcp 172.16.2.0 0.0.0.255 any eq www
    access-list 120 permit tcp 172.16.3.0 0.0.0.255 any eq www
    access-list 120 deny   ip any any
    I have some questions:
    1) In the command "ip wccp web-cache redirect-list 120", "redirect-list 120" is not required since all vlans are clients.
    using  ip wccp web-cache redirect in under all subinterfaces alone would work.
    Am I correct ?
    2) How can I redirect HTTPS traffic to my squid proxy.

    Hello,
    1. "ip wccp web-cache redirect in"
    It would work if you squid proxy have another default gateway to internet.
    Otherwise the traffic from the SQUID is also forwarded. You have to use different interfaces for users and squid. On sabinterfeyse vlan SQUID you should not use a configuration wccp
    2. Web-cache permit only http. You must configuring Dynamic WCCP.
    some example:
    in global:
    ip wccp 120 redirect-list 120
    access-list 120 remark REDIRECTION_CRITERIA
    access-list 120 deny   ip host 192.168.1.2 any
    access-list 120 permit tcp 172.16.1.0 0.0.0.255 any eq www
    access-list 120 permit tcp 172.16.1.0 0.0.0.255 any eq 443
    access-list 120 permit tcp 172.16.2.0 0.0.0.255 any eq www
    access-list 120 permit tcp 172.16.2.0 0.0.0.255 any eq 443
    access-list 120 permit tcp 172.16.3.0 0.0.0.255 any eq www
    access-list 120 permit tcp 172.16.3.0 0.0.0.255 any eq 443
    access-list 120 deny   ip any any
    on interface:
    ip wccp 120 redirect in
    See link below for more information
    http://www.cisco.com/en/US/docs/ios-xml/ios/ipapp/configuration/12-4t/iap-wccp.html#GUID-5E9AE273-1AFD-4598-9325-85F8C822D168
    Best regards

  • What happens if I need to cancel my subscription before the year is up? Also, how do you cancel?

    How do you cancel subscription before the year is up? How do you cancel

    See http://helpx.adobe.com/x-productkb/policy-pricing/cancel-membership-subscription.html
    "Cancel an annual membership (individual or team)
    If you cancel within the first month, you receive a full refund. Otherwise, you are billed 50% of your remaining contract obligation.
    To cancel your membership at any time, contact us.
    To cancel your membership in the last month (month 12), follow the steps in the "Cancel a month-to-month membership" section below. (If you cancel an annual membership in the last month you don't need assistance from customer support.)"

  • HT1933 How are you supposed to do this when it DOESN'T EVEN WORK!!!! you press report problem and it comes up saying " too many http redirects". Total useless !

    How are you supposed to REPORT THE PROBLEM when it DOESN'T EVEN WORK!!
    I clicked it as I got a receipt for something that HAS NOT EVEN BEEN BOUGHT ! (It's funny how apple try to charge me twice for something when I work nightshift and my phones switched off!)
    and all that happened was it came up saying "too many HTTP redirects" .
    And it won't let me report it ! X

    Go here:
    http://www.apple.com/support/itunes/contact/
    and follow the instructions to report your issue to the iTunes Store.
    Regards.

  • How to send a https request using jsf

    hi
    Can anybody tell a sample how to send a https request using JSF ...
    thanks

    Prefix the request URI with the https protocol.
    The answer is too easy and straightforward that I guess that you mean something else. If you just want to know how to configure an SSL environment for your own webapplication, refer to the Java EE tutorial chapter 28: http://java.sun.com/javaee/5/docs/tutorial/doc/

  • How to transfer the http request from applet to servlet/jsp

    I use the JTree component to create a navigation of a website,but i don't
    know how to connect the tree's nodes with the jsp/servlet.
    I mean how to transfer the http request from the applet to a jsp.
    I use the "<frameset>" mark which will divide the web browse into 2 blocks.
    The left side is Applet,and the right side is the linked jsp page.
    what I say is as the weblogic console layout.
    who can help me!!!
    Thank You!

    I use the JTree component to create a navigation of a website,but i don't
    know how to connect the tree's nodes with the jsp/servlet.
    I mean how to transfer the http request from the applet to a jsp.
    I use the "<frameset>" mark which will divide the web browse into 2 blocks.
    The left side is Applet,and the right side is the linked jsp page.
    what I say is as the weblogic console layout.
    who can help me!!!
    Thank You!

  • How to redirect https traffic to captive portal?

    Any WLC controller model (8500/5508/2504/vWLC) version 7.3 and up..
    This is unusual scenario wherein clients have a default homepage to https://www.google.com (sample only)
    Typical http web redirection don't have any problem at all. When you open your browser and type http://www.google.com it will redirect to captive portal without any problem.
    Is there any way to redirect https traffic to captive portal as well?

    redirection only happen on http traffic, a feature request has been issued to have the redirection happen on https.
    please check the following
    CSCar04580
    http://tools.cisco.com/Support/BugToolKit/search/getBugDetails.do?method=fetchBugDetails&bugId=CSCar04580
    Please make sure to rate correct answers

  • I need to know how to force a https redirect in Adobe Muse if this can't be done please tell me so I don't waste any more time... please

    I need to know how to force a https redirect in Adobe Muse if this can't be done please tell me so I don't waste any more time... please

    Protocol usage and redirects are a server-side thing. This has nothing to do with designing the web page and thus nothing with Muse, either.
    Mylenium

  • How to redirect http to www

    This isn't limited to dreamweaver, but I hope someone can
    help. I create a website for a domain, let's say xxxx.com and post
    it no problem. If you type
    http://www.xxxx.com, in a browser
    it comes up fine. If you type
    http://xxxx.com (without the www), it
    will also come up fine, and the address bar of the browser shows
    http://xxxx.com (i.e. without the www).
    My client would like the address bar to display the www in
    both cases, i.e. even if the user does not type in the www. I've
    looked around, and while most sites do not display the www in both
    cases, some do, so I know it's possible.
    Can anyone help me with this? Thanks a lot.

    Get the hosting company to set up a redirect. It's pretty
    simple for them to do.
    Andy

  • How to submit a HTTP Request from a Java Program

    I am working on an web based application where in I need to submit the HttpRequest through a Java Program and not through browser. Moreover my intent is just to submit the HttpRequest. I donot want to wait for the response to come back. I have used the URL Connection class to do the same and I am trying to post this request. The contents of the methods that I am using are as below:-
    public void doPost(URL url, String inputXMLString) throws IOException
              //Create URLConnection based on the passed URL
              URLConnection connection = url.openConnection();
              connection.setDoOutput(true);
              connection.setDoInput(false);
              connection.setUseCaches(false);
              connection.setAllowUserInteraction(false);
              connection.setRequestProperty("Content-type", "application/x-www-form-
    urlencoded");
              //Get the Connection's output stream and write the request to it.
              PrintWriter out = new PrintWriter(connection.getOutputStream());
              out.print("&ena-request-input=" + URLEncoder.encode(inputXMLString));
              out.flush();
              out.close();
    Call to the above method does not invoke the URL I am intending to submit the request at.
    Can anybody give me the clue....................................................?

    I agree with the advice to launch a new thread to read and ignore the response. I don't think you should have to do it to make it work, but it's worth trying for two reasons:
    1) If it turns out it does make it work, well, then either you can leave it that way, or use that as a clue to help figure out how to make it work the way you want.
    2) There may be an error message there that will give you an idea why it's not working.
    When you say it's not invoking the servlet, what does that mean, and how do you know? Is it just that the final results aren't being seen? Put a bunch of logging statements in the servlet. It could be that it's getting hit, but you're corrupting the string you're building, or sending some extra junk that it can't handle. Spit out a log statement from the start of doPost, to see if it's even getting there. Then log the parameter. Enclose the output in quotes or braces or something to make sure there's not extra junk. I've had XML docs not parse because there was a blank line at the beginning.
    If it works in the browser but not from your standalone app, then you need to have the servlet tell what difference it sees in the two cases. Print out headers, other params, everything you can think of.
    Re-read the docs for URL, HttpURL, whatever, to make sure you're doing all the right steps in the right order. Make a servlet that just takes a single, simple param=value via POST and see if you can get that to work.

Maybe you are looking for

  • Can't copy files from desktop to external hardrive, it just bounces back?

    Hello! I can't just drop and drag any files from my macbook pro desktop into my hard drive icon, they just bounce back. But it will work in windows VM, any idea how i can get it to work on mac? Thanks

  • Disk images won't unmount/eject for admin user, DVDs & iDisk also affected

    This problem started when I was on Tiger, and seemed to follow me onto Leopard. It only affects me, the primary user on my Mac. *One other user on the computer; she also has admin level access and does not have any of these problems.* Here's the deal

  • PRE 12 + Phantom Burner

    I am attempting to create a Blu-Ray ISO file of a Premiere Elements 12 project.  PRE12 is installed on a Dell XPS 420 with Windows Vista SP2. I have completed the project and installed Phantom Burner 2.0.  I have created the Phantom Burner file by ri

  • Reg.Internal error msg no. 8J607

    Dear Experts In AFS without grid assigned for a material, We are doing goods movement in MB1B with 311 E mvt type, if I enter the purchase order number and press enter the system show the " internal error msg no 8J607" how to solve that problem. Pls

  • [WIP] Migration to Director 11

    Hello.. I am migrating my previous MX (in progress, suddenly 11 came out) to 11. Can anyone please run my Shockwave and inform me if theres any issue. There are only 2 scenes. http://www.gettingf.com/Director11/LingoTerrain06.htm 1. Solar system 2. T