Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How to redirect what's in the browser's URL to PfSense's FQDN?

    Scheduled Pinned Locked Moved webGUI
    2 Posts 1 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mikeisfly
      last edited by

      I have purchased a wildcard certificate for my home network so I will stop getting the certificate error in my browser. (It was  cheap < $100) http://cheapsslsecurity.com. Accessing my firewall from outside the network is not a problem, but when I'm home I don't usually access my equipment by the FQDN. If I access it by it's FQDN I don't have a issue but when I access it by it's domain name I get a certificate error. I have looked in the settings and I don't see where I can get PfSense to redirect the URL to the FQDN when using HTTPS (HTTP I'm thinking this is a non issue). I'm assuming this has to be done server side. I am running Windows Server 2012 R2 and have DNS setup, but I don't see how this can be done from the DNS server stand point unless I'm missing something. Any help would be appreciated.

      Thanks,

      1 Reply Last reply Reply Quote 0
      • M
        mikeisfly
        last edited by

        I found some code that may work see below:

         <virtualhost *:80="">ServerName undesired.example.com
          ServerAlias example.com notthis.example.com
        
          Redirect / http://www.example.com/</virtualhost> 
        
         <virtualhost *:80="">ServerName www.example.com</virtualhost> 
        

        I found this code on http://stackoverflow.com/questions/3028166/how-do-i-redirect-a-user-using-apache-rewrite-to-the-fully-qualified-domain-nam

        My question before I attempt to add this is what web server does PfSense use 2.1.5 64 bit and what web server does 2.2 64 bit use?

        I'm assuming that it is Apache but you know how the saying goes. I would like to see functionality built into PfSense in the form of a check box maybe on the Advance tab. If I have some time I may try to hack this in this weekend. Doesn't seem like to many lines of code to add.

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.