same server, same Host name, new domain, redirect from old domain to new domain

We have had a change in our internal network and got a new domain. Our network team did set necessary forwarding rules for IP address and domain. JIRA still runs normal with the old domain name but that will be switched off soon. When I set the Base URL in JIRA to the new domain I get some weird appearances. If I open JIRA in browser with the new URL jira.new-domain.org everything is fine.  If I'm using the old jira.old.domain I'll get a new login window with username & password at the new domain when I switch dashboards or open the administration pages. Also I have some trouble with SSL certificates and so on.

For that reason I want to redirect the URL if a user comes over the old URL. I've already read some guides how to configure the urlrewrite.xml but it simply doesn't work.

That is the file:

 

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 4.0//EN" "http://www.tuckey.org/res/dtds/urlrewrite4.0.dtd">

<!--
    URL Rewrite files to make issue navigator URL backwards compatible and some other things
    @since JIRA 3.3
-->
<urlrewrite>
    <!-- Caching of static resources -->
    <class-rule class="com.atlassian.jira.plugin.webresource.CachingResourceDownloadRewriteRule"/>
    <!-- @since 5.0 [KickAss]-->
    <rule>
        <from>^/issues(\?.*)?$</from>
        <to type="permanent-redirect">issues/$1</to>
    </rule>

    <!-- Umleitung old.domain auf new-domain.org -->
    <rule>
         <name> old.domain redirect </name>
         <condition name="host" operator="notequal">^https://jira.new-domain.org:8443</condition>
         <from>^/(.*)</from>
         <to type="permanent-redirect" last="true">https://jira.new-domain.org:8443/$1</to>
    </rule>
</urlrewrite

As far as I understand, every URL not from "https://jira.new-domain.org:8443" should forwarded to it. But it doesn't work. I have also a port forwarding from 8080 to 8443 active. For example when I use "jira.old.domain" it forwards me to "https://jira.old.domain:8443". Is there a correlation between both configurations or what I'm doing wrong? Please help!

 

1 answer

Hello Svea,

Save yourself some truoble and proxy jira with apache, nginx or IIS (if you are running windows)

https://confluence.atlassian.com/kb/proxying-atlassian-server-applications-with-apache-http-server-mod_proxy_http-806032611.html 

Also, your users are likely not to remember port numbers. 
https://jira.example.com is much easier to remember than https://jira.example.com:8443

 

Cheers,

Lars

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,323 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot