URL Rewrite jira to jira:8080 [Answered]RSS

6 replies

Last post May 24, 2019 06:17 AM by Able

  • URL Rewrite jira to jira:8080

    May 16, 2019 02:12 PM|tristanpersaud|LINK

    Hi Team,

    I need to rewrite the address jira to jira:8080 in IIS. I found a number of resources online with similar requests but my understanding of patterns and wildcards is limited. See the link at the bottom. In it you will see they are matching the phrase "uat" in http://www.company.com/uat. For my URL there is nothing after to match. Any assistance is appreciated

    End Goal (On same server):

    jira -> jira:8080

    wiki -> wiki8090

    confluence -> confluence:8081

    https://forums.iis.net/t/1236427.aspx?URL+Rewrite+redirect+to+the+port+80+not+port+8080+on+Internal+web+server

    Thank you,

  • Re: URL Rewrite jira to jira:8080

    May 17, 2019 07:05 AM|Able|LINK

    Hi tristanpersaud,

    According to your description,I couldn't understand your requirement clearly.So could you please tell me that for example  which part is jira:8080 in the url ,http host or just the path? You want redirect www.jira.com to www.jira:8080.com or want to redirect www.sample.com/jira  to www.sample.com/jira:8080

    Else if you want to  redirect www.jira.com to www.jira:8080.com  I hope you could show  the  bindings to  your site which you could see as below:

    Best Regards

    Able

    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
  • Re: URL Rewrite jira to jira:8080

    May 22, 2019 04:05 PM|tristanpersaud|LINK

    Hi Able,

    Thanks for getting back to me. Users will be entering "jira" into their web browser and will be redirected to "jira:8080" by URL Rewrite. Basically just add a port based on the URL entered into the web browser. The URL will always be just "jira". Jira binds to port 8080. The Default Site binds to port 80 and will rewrite URLs. We need the Default Site to rewrite URLs for "jira", "wiki", and "confluence"

    Thank you,

  • Re: URL Rewrite jira to jira:8080

    May 23, 2019 08:17 AM|Able|LINK

    Hi tristanpersaud,

    According to your description, I have made a sample here. Firstly, you should make sure, each site has one domain, so www.jira.com is for one site and we should create  other  two url rewrite rule for the wiki and conflunence. Else you should add your bindings as  below which I use www.sample.com to replace jira .you could see :

    Then , for urlrewrite rule ,You could write as below:

     <rule name="rule1" enabled="true" stopProcessing="true">
                        <match url="(.*)" />
                        <conditions>
                            <add input="{SERVER_PORT}" pattern="^80$" />
                        </conditions>
                        <action type="Rewrite" url="http://www.jira.com:8080/{R:1}" />
                    </rule>
                </rules>

    Best Regards

    Able

    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.
  • Re: URL Rewrite jira to jira:8080

    May 23, 2019 06:41 PM|tristanpersaud|LINK

    If all three websites are running on the same server, is there a way to detect everything before the "/". The pattern (.*) will match everything with the X's in jira/xxxxxxxx. However, I want to match everything before the "/". The reason is that the web addresses jira, confluence, and wiki will hit the same server on port 80. Based on the web address http://jira, http://confluence, or http://wiki the correct port will be added

  • Re: URL Rewrite jira to jira:8080

    May 23, 2019 11:17 PM|lextm|LINK

    tristanpersaud

    If all three websites are running on the same server, is there a way to detect everything before the "/".

    Check Mistake 1 to learn how to use conditions, https://blog.lextudio.com/the-very-common-mistakes-when-using-iis-url-rewrite-module-a2ab7e4fee59

    Lex Li
    IIS Consulting Services at https://support.lextudio.com/services/consulting.html
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: URL Rewrite jira to jira:8080

    May 24, 2019 06:17 AM|Able|LINK

    Hi,

    According to your description , you could add conditions in url rewrite to match the  jira which is httphost part of url.

    <rule name="port redirect" enabled="true" stopProcessing="true">
                        <match url="(.*)" />
                        <conditions>
                            <add input="{SERVER_PORT}" pattern="^8080$" negate="true" />
                            <add input="{HTTP_HOST}" pattern="www.jira.com" />
                        </conditions>
                        <action type="Redirect" url="http://{HTTP_HOST}:8080/{R:0}" />
                    </rule>

    You could learn condition in the link as below:

    https://forums.iis.net/t/1237519.aspx?What+is+the+usage+of+condition+in+url+rewrite

    https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/url-rewrite-module-20-configuration-reference

    Best Regards

    Able

    Please remember to click "Mark as Answer" the responses that resolved your issue.
    If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.