1

My company once has a server named as stash.mycompany.com.

And somehow that domain name changed to bitbucket.mycompany.com.

The problem is that, cuz not all systems can't change the name, these two domain names exist.

The problem is some inter-related systems such as Confluence, JIRA, themselves, confused with links.

  • Say, when I click the PR link (of stash...) from JIRA, the login page doesn't work.
  • But the login page of actual `stash...`` works.

That's why I want to know of any way to make the chrome traslate the stash... domaint to bitbucket... domain, if it is possible.

So I want to know, is there any way to make my browser works like bitbucket... for any links of stash...?

Should I change the C:\Windows\System32\....\hosts file?

Can I do that with my browser? Chrome?

2
  • 1
    Changing your hosts file would only affect your own machine. A CNAME entry would be what you're looking for. DNS name don't suddenly changed, someone changed the DNS configuration. Stash and bitbucket are different products. – Seth Mar 13 '20 at 8:30
  • 1
    What exactly do you mean by “confused with links”? Did you not update the Stash/Bitbucket integration with the new URL in the other Atlassian products? // Also, how, exactly, do both domains still exist? Do both load Bitbucket directly? Does one redirect to the other? – Daniel B Mar 13 '20 at 8:45
4

The only way you can use in this situation is to redirect it from the server or domain name management. As far as I know, you can’t redirect a domain name to a domain name with the hosts file. Even if you found a way to do so within your browser, it only works on your computer, not on other PCs.

In domain name manager, you can set up to redirect one sub domain to another one.

The other way is to upload an .htaccess file to stash.mycompany.com and force it to redirect to bitbucket.mycompany.com.

To further help, can you provide more information on the type of hosting/server?

1

From your updated question, it appears what your company (not just you) really needs is a HTTP redirect service. This isn’t a problem with DNS or anything, it can only be solved using HTTP.

Since Bitbucket is an appliance, you need an additional web server to accomplish this.

stash.mycompany.com needs to be pointed at the separate web server. The separate web server needs to be set up to redirect http://stash.mycompany.com/<whatever> to http://bitbucket.mycompany.com/<whatever> (relatively trivial).

However, you also need to make sure that all configurations (Jira, Confluence, ...) are correctly updated to point at the current Bitbucket location. They may not be able to handle redirects. The redirect solution is only to allow old links to work.

If there is absolutely no way your IT will implement the correct solution, you could use the “Redirector” browser extension (Chrome, Firefox) to fix links in your browser. Of course, this will only affect your browser and nothing else.

0

I'm answering for my own question for others.

I reached to an end of using https://github.com/jmhobbs/domain-swap extension with my chrome browser.

When I set domain groups as

statsh.mycompany.com
bitbucket.mycompany.com

I easily can switch between two domains preserving uri paths.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.