Hello!
Please see image of my version: (1.17 stable)

Please see image below of the attempted redirect urls:

First, I want to mention that we use two instances of osTicket that are installed on similar servers. One is public facing and I was able to get that one running without problems that I could not fix myself with a little patience, google, and this forum.

However, The second instance that I am having trouble with is for internal use and is NOT public facing. I think this may be where the issue lies in my efforts to set this instance up. I followed every step exactly as I did the first instance, but when it comes time for the redirect URL to kick in, I get brought to the infamous Error 404 page. Obviously I'm doing something wrong, but I was hoping maybe someone could help point out where that issue would be. I have tried several ways to set up the redirect URL (as evident in the screenshot) even using the FQDN.

Unfortunately, I did not have the foresight to take a screenshot of the 404 error page for the redirect to see if it gave any more insight. I will reproduce this tonight after production hours and post here if that ends up being required.

P.S. While i'm here, I just wanted to express my gratitude for the continued efforts by the osTicket community including the tireless efforts ntozier and the development team put into answering questions. I can't count how many answers you have all given on this forum that have helped me without need to write my own question. 😄 We've used the product for years and it has been wonderful on so many levels for our small company.

  • KevinTheJedi replied to this.
  • KevinTheJedi likes this.
  • jbeaudion

    404 is "Not Found" error and means the URL could not be found on your webserver. We've seen issues with IIS and URL Rewriting so there are a few threads on this already. A community member even posted his webConfig to show what's needed.

    Cheers.

    jbeaudion

    404 is "Not Found" error and means the URL could not be found on your webserver. We've seen issues with IIS and URL Rewriting so there are a few threads on this already. A community member even posted his webConfig to show what's needed.

    Cheers.

      KevinTheJedi
      You were dead on, I needed to fix my URL rewriting in the IIS manager and it worked like a charm right after.

      @jbeaudion

      Can you please share what you had to do in order to address the issue? It’ll help others who may run into this in the future.

      Cheers.

        jbeaudion

        I went through and re-tested this with Windows Server 2016 (all I got for now) and I see how this issue can occur. So we do ship with web.cofig files in the codebase. This is fine and all but if your IIS webserver does not have the URL Rewrite module installed/enabled then these configs will not be read/executed. So if you are using IIS and getting 404 when redirecting back to osTicket you simply need to install/enable the URL Rewrite module for IIS, restart IIS, and retry.

        I was also able to confirm that you do not need to manually add custom rewrite rules as we ship with web.config files so all you really need to do is install/enable the rewrite module and restart IIS and you are set!

        Cheers.

          KevinTheJedi That explains a lot, because I basically "stole" those rewrite rules from my instance that did work, but I had no idea how they got there to begin with. 😅

            jbeaudion

            I'm a complete IIS noob so I totally didn't realize that my instance already had this module installed so I couldn't replicate the issue. But after I saw your post I was like hmm let me check and sure enough it was already installed and reading the web.config so that's why mine was working already. Glad everything was worked out and it's not too big of an issue 😅

            Cheers.

            2 months later

            UnderDogMiller

            Well that error says otherwise. 404 means not found which means the url isn’t being rewritten.

            Cheers.

            Correct - the 404 error didn't change after adding the Rewrite tool. However - the rewrite tool is working to REDIRECT (not rewrite) http to https redirects. Thus, I am missing something. I saw a previous post where someone had inserted all the custom rules for the rewrite. I guess I am not sure how to troubleshoot the rewrite tool to ensure it is rewriting URL's. Here is my redirect rule that works for http to https:

              I'm getting closer - now instead of the 404 error I get: URL not supported.

              I'm going to drive myself insane...and probably you guys too.
              I decided to remove the plugin and start from scratch...but now I get a blank banner when configuring the OAuth2 (clicking the "config" button) as shown here:

                UnderDogMiller

                Look at your logs (general server logs, webserver error logs, PHP error logs, MySQL/MariaDB error logs, osTicket System Logs, Browser Console logs, etc.) for any related errors.

                Cheers.

                UnderDogMiller
                When this happened to me I had to totally delete the email and then re-add it. In my case it was the "Default" email account, so I couldn't delete it until I set a different email as the default in "email > settings". If that fails you'd have to delete the entry in the database for the email account with phpmyadmin or something similar to make it easier to find the entry.

                  jiggs - thanks that helped me get things back - but now I still get the "URL Not Supported" message after clicking submit and authenticating with our 365 account. I'm using the email account credentials for the email address that I'm working with.. It is the Redirect URI field... the very first field that contains: https://support.company.local/api/auth/oauth2. When I put this into Chrome - it says: "URL Not Supported."

                    UnderDogMiller

                    URL Rewriting is not enabled or not working in your instance. You will need to search online on how to enable this in your environment (it differs depending on the server and setup).

                    Cheers.

                      KevinTheJedi - thanks for the quick reply. It does seem like the rewrite is working because the "URL Not Supported" is not coming from IIS or the client browser, but from the class.dispatcher.php code in the include folder.

                        UnderDogMiller

                        I see, read that wrong, thought it was "not found". That typically means the URL you are attempting to visit can’t be found in the available rules. The rules are setup in the plugin and should be working properly. If not then something deeper is going on.

                        Cheers.