Redirect the http to https

I use OS X Server with OS X 10.10.5 5.0.15.

I have 2 domains pointing to the IP address of my machine OS X Server by using DNS.

Users.NewSite.com and users.oldsite.com

The configuration of the domain for the OS X Server machine is users.newwebsite.com

It comes as the site server configuration and I also have a Web Server (SSL) site configuration as well.

I have a configuration of the redirect for "Site Web Server" redirect to the website Server (SSL)

This part does not work properly.

The problem is with the second field.  If people type in users.oldwebsite.com they get an error message that the connection is not secure.  It seems that the browser is trying to redirect the http://users.oldsite.com to https://users.oldsite.com.

I need all calls to http://users.oldsite.com to redirect to https://users.newsite.com

Or really something starting with http://users. should redirect to https://users.newsite.com

Is this possible with regex?  If so, what the expressions would look like?

Website of the Apache and the documentation is the canonical source for more information on RewriteRule examples and examples of redirection, mod_alias and mod_rewrite.

A slightly twisted example of the Apache documentation:

< VirtualHost *: 443 >

ServerName undesired.example.com

ServerAlias example.com notthis.example.com

Redirect ' / ' "https://www.example.com/".

< / VirtualHost >

< VirtualHost *: 443 >

ServerName www.example.com

< / VirtualHost >

The second VirtualHost entry is for the host site for your choice, you will probably already have this present block in your configuration file:

/Library/Server/Web/config/apache2/httpd_server_app.conf

There are various examples and discussions of this publication autour of the ' net like this to StackOverflow.

FWIW, newsite.com and oldsite.com are real and registered areas.

Tags: Servers and Enterprise Software

Similar Questions

  • OSX Apache Server: how to redirect the http request?

    Hi all

    I have a Mini Mac OSX Server El Capitan running. It already serves some sites. Normal Server Web sites:

    -site1.example.com

    -site2.example.com

    Now, I have installed an application that has its own built-in web server. This application would be normally accessible via http on port 80. However, http on port 80 connections are automatically considered trapped by integrated apache of the OSX Server. Therefore, I now put the web application to run in a different port to apache. I also setup a subdomain, so that users can access this application directly, but they also have to type in the port in the URL - for example, the new web app site is reachable at the:

    -myapp.example.com:7117

    What I would do, is for users to simply access the application using:

    -monappli.exemple.com

    I know that there is a way for us to have apache to "Reroute" all requests for a specific to an internal port subdomain automatically, but I don't even know where to start. What are the files we need to configure on OSX Server? How configure us them?

    Any guidance would be greatly appreciated.

    I had the same requirement and has resolved the way you want to as described below.

    1. Define the additional app to run on another port
    2. Create a site in.app using port 80 and the same host name you want to use for the additional application
    3. Set up a redirection for this site in.app as follows
    4. Source = /, Destination = http://hostname.domain.com:1234 /, Status = Permanent (301)

    Of course, use the correct host name, the domain and port for your situation.

    PS. the same approach I have described above also can be used to redirect the corresponding https port 80 or 443 site.

  • get the port to the server during redirection between http and https

    Hi, I have the following scenario, where I have to redirect http to https, and vice versa. When I call getServerPort he returned some port is configured for the current regime (https or http). The problem is I have to go the url with the port for the https scheme, in the scenario of http-> https redirect. So the getServerPort method does not provide me that. I don't want to hard code the port numbers because they are subject to change. Is it possible to get the ports configured for the systems supported by the servlet container?

    In the number short. If ports are subject to change, and then store this information in a database and retrieve it from there.

  • AFCS.java does not support the http redirection query

    Hello team AFCS,

    I just tried the java script for external authentication. By default, when you call new CAA. AccountManager (accountURL);, I get an error as follows:

    ' GET '. http://ConnectNow.Acrobat.com/myaccount?mode=XML & accountonly = true & failed with status 302 ";

    Actually this url will be redirected to " " https://NA2.ConnectNow.Acrobat.com/myaccount?mode=XML & accountonly = true & ' for me. .

    However, the script handles the http response only when status = 200, or he review the status as error.

    So I added following code to http_get () / http_post (), everything is going well until now.

    If (responseCode == 200) {}

    ......

    Return connection.getInputStream ();
    }
    manage the status of redirection
    ElseIf (responseCode == 302) {}
    http_get (connection.getHeaderField ("Location"), headers) return;
    }

    else {}

    throw new Error();

    }

    Is this something must be corrected in the next version?

    Thank you!

    Djinn

    This problem has been fixed for the next version of the SDK. Thank you!

  • How to prevent the FF loading all Web sites using the HTTPS protocol

    FF is trying to load initially all Web sites using the HTTPS protocol, including of mozilla.org. Then I get the error of no reliable connection of course. Mozilla .org is the "invalid security certificate" and "the issuer of the certificate is unknown." I tried to delete the file cert8.db as suggested elsewhere but that did not help. If there is an option for this somewhere, I can't find it. I have the latest version of FF and Win7 running. Thanks for the help.

    There must be some sites that are still using a secure connection, as http://www.amazon.com/. If even a link to Amazon is redirected, you can check if you have an extension like HTTPS Everywhere.

    For Mozilla sites, Yes, you establish a secure connection.

    But you shouldn't get certificate errors! When you get this for virtually all secure sites, the problem is usually as follows:

    (1) error of date, time, or time zone who throw checks validity of the certificates of your system. Sometimes allowing to use a timesource on the internet, the computers can introduce this problem.

    (2) not be set up to work with your security software that intercepts and filter secure connections from Firefox. Products with this feature include Avast, BitDefender, ESET, Kaspersky; AVG has a shield search function which can cause this error on search sites.

    (3) malicious software on your system for the interception of secure connections.

    So... who is?

    If you have any of these specific security products, which would be the first thing to check. We might be able to help with specific next steps based on what you have if you tell us.

    Alternatively, you can examine the certificate to which Firefox is opposed to see if the issuer information pointing to the culprit. Take for example my test page:

    https://jeffersonscher.com/RES/jstest.php

    You should see a section "I understand the risks" in the page. If you expand this section, you will find a button Add Exception. You don't need to complete the process of adding an exception (I suggest not adding one until we know that it is not a problem of malware), but you can use the dialog box to display the information that makes Firefox suspicious.

    Click Add an Exception, and then view. If the view is not enabled, try first the button get certificate. Then in the certificate Viewer, refer to the section "issued by". What do you find here, or under the hierarchy of certificates? I have attached a screenshot for comparison of screen.

  • Google search plugin redirects to https

    I am increasingly frustrated with the search plugin Google search results redirecting to https.

    I edited the xml file Google so that all instances of https were replaced by http, then deleted the search.json file, but my search results always redirected to https.

    I deleted also cookies and temp files but the problem persists.

    The reason bugs me so much is that my adblocker cannot filter https.

    I don't know if it's a FF issue, or more likely, there Google doing the redirect, but a previous version of FF was fine once I edited the xml file.

    For any help or suggestion would be cool.

    Thank you.


  • 16.0.1 redirect unwanted https forces

    One of my friends and I worked more than a year on a web site project. We now see that Firefox automatically redirects the URL to an address https with a 404 not found error. If you type in http://www.sitename.com, www.sitename.com or sitename.com and press ENTER, it redirects to https://www.sitename.com. If you add a closing "/" before hitting entry, it doesn't happen.

    When our new website is published, we are very concerned that new users running Firefox 14.0 + will try to access, experience this issue, and let. There are the patches on my personal computer that would probably prevent it, but this isn't the real solution here. Anyone?

    Yes, I found the problem. I searched the history and about a year and a half, for some incomprehensible reason, I have consulted with, or tried to access this page with a https URL, probably accidentally. Firefox never forgot it. I deleted this story line, and now the problem is solved. Moral, if this happens to you: the history of the research.

  • Error SSL blackBerry Smartphones when redirect to HTTPS

    We have the new Stroms in home and users are complaing that HTTPS login screens can access.  They were able to get on the site on their 8830's

    Errors;

    -The server returned the following error: "access denied: insecure SSL request.

    -Unable to connect using the current security settings. Please contact your service provider

    -Vous MDS has been configured to reject the SSL request on servers have certificates that are not approved or has expired.

    I tried to solve this problem as follows;

    -Options / Security Options / TLS

    -Changed 'Allow the HTTPS redirects' = YES (did not work)

    -changed 'Proxy' in 'Pocket' (didn't work but I got a different error message)

    Selected server returned an error during attempthing to fill ask you.

    Anyone have any suggestions on how to fix this?  Or is it a setting on the BES?

    Thank you

    I found the problem.

    The last adjustment was inside the browser.

    When in the browser select Options / General / default browser has been configured for Blackberry

    * I changed "Internet browser" and it worked.

  • Report icon that appears between the http: box box and google is missing

    In the old version of Firefox the report security icon (Trusteer endpoint protection) is located between the http; area search and the google search box. Use the report to protect a site I just clicked on the icon and asked him to protect. The icon is not visible in the latest version of Firefox, although the software is still loaded. It's on Windows 7 but on a XP machine, the icon is still there?

    You may have an older version installed. While Firefox is closed, install the latest version.

    If this does not resolve the problem, right-click on an empty area of the tab bar and select Customize. Drag the icon from the palette on a toolbar.

    If that doesn't help either,

    1. Type of topic: support in the address bar and press ENTER.
    2. Click the display folder. Opens in a window of Windows Explorer with your profile folder.
    3. Release of Firefox.
    4. Delete the file localstore.rdf in the profile folder.
    5. Launch Firefox and new right click on an empty area of the tab bar and choose Customize, then drag the icon from the palette on a toolbar.

    If the problem persists, contact the author of the add - we support at the link above.

  • sites like yahoo, google, facebook, see the https and the padlock, but sites like amazon, ebay, where I need to enter my credit card information show the grey globe?

    Recently, I noticed that some sites like yahoo, google, facebook, bing still show the https and the lock that indicates a secure link/site. However, sites like amazon, ebay, where I need to enter personal and financial information shows the grey world, as I understand is not sure. How can I fix it? I read the posts related to this topic, but none of the suggestions to solve my problem.
    Thank you!

    Hi lisa14, gray globe corresponds to HTTP, because HTTP is not secure. You should see a padlock for HTTPS pages.

    For Amazon, I think that they go back to HTTP on the product pages and only use a secure connection on the account and payment pages.

    I don't know about eBay, sorry.

  • How to force google to the http context menu search?

    In my previous Firefox, Google context menu search ("google search for ____") would go to normal http Google search results. Now it goes to an https page. How can I get that back to the http of the Google results page? This is important because the filter that I use that works with http.

    Hello, all first please Update Firefox to the latest version for firefox 15 is no longer supported and affected by many known security vulnerabilities.

    context menu search uses the same search engine that is currently selected in the firefox search bar - so you can install a search engine google no ssl http://mycroft.mozdev.org/search-engines.html?name=google & category = 12 & then select it in the search bar...

  • Where is the ((http://)) que doit je faire pour le voir dans la barre d'État))

    Where is the ((http://)) que doit je faire pour le voir dans la barre d'État))

    If you want to display in the bar:

    https://support.Mozilla.com/en-us/questions/890803

    Thank you

  • the http disappears after clicking on enter

    When I type the http:// for a website, the http:// disappears when I hit enter

    7 Firefox cache http protocol after loading the page. Other protocols, such as gopher, ftp, https, etc., show all the time.

    To restore the http prefix:

      1. Type about:config in the location bar and press Enter.
      2. Use the Filter box to search for trim
      3. Double-click or right-click on the browser.urlbar.trimURLs preference to change its value to false
    
  • TOSHIBA AC100 - browser opens all the 'https' pages

    How I can resovle this problem?
    http://youtu.be/-zGS-J4oxBM
    http://youtu.be/vQJyzbAmr3g

    Browser opens all the 'https' pages and I can't add my Google account.

    Time is correct.

    Maybe you should check out the HyperText Transfer Protocol Secure (https) option in the browser settings
    Check if cookies should be accepted.

  • How to connect my ipencil with the http://bit.ly/joc0zm application?

    I looked at the demos of the pencil for a job for which is obviously the http://bit.ly/joc0zm app. I bought the pencil and the http://bit.ly/joc0zm app but can find no way to add the pen device to the app. Only my finger works? How can I add the pen device to the http://bit.ly/joc0zm app?

    Assuming you have an iPad Pro, you should be able to plug the connector of lightning on the port your iPad lightning pencil to pair them up. When you have successfully paired with pencil, http://bit.ly/joc0zm should work as expected.  Good luck!

Maybe you are looking for