0

I'm using Firebase Hosting. I own two domains: mydomain.com and mydomain.pl (polish version)

I would like to redirect mydomain.pl to mydomain.com/pl (this is how I manage website translations).

In Firebase Hosting configuration I can only redirect mydomain.pl to mydomain.com. If I enter mydomain.com/pl error message is shown: "Enter a valid domain (not a URL)".

Website is served using https.

aponski
  • 145
  • 3
  • 12
  • I think this has the answer to your question – Plantera Apr 09 '19 at 16:17
  • @AlexTrix Which answer are you reffering to? Under provided link there are lots of hacks using javascript. I'm not sure this is the best way to solve my issue. – aponski Apr 10 '19 at 06:33

1 Answers1

0

Instead of redirecting with firebase hosting, create an index.html file for yourdomain.pl and then use javascript to redirect. You don't need any content at all in the index.html file just your redirect. You can use this code:

<script>
window.location = "https://yourdomain.com/pl";
<script>

Let me know if you need any help.

Anonoymous
  • 57
  • 8