So i am trying to use the redirect meta tag on a web app hosted on Githubs gh-pages.
This is the tag I'm using; which works well on the local dev machine
<meta http-equiv="refresh" content="0; url=/angular/?layout=4#/app/home" /> <!--redirect-->
The problem is that gh-pages sites live on a URL like this
https://github.com/username/reponame
Which means that my redirect doesnt work because it drops the reponame
for this:
https://github.com/username/angular/?layout=4#/app/home
obviously I could hardcode the repo name in the redirect tag but then this would mean that it wont work when im developing locally because the URL in the local dev doesnt include the repo name.
How should my meta tag be set up for this to work locally and on gh-pages
You can use a relative url like ./angular/?layout=4#/app/home
.
Your redirect now reads :
<meta http-equiv="refresh" content="0; url=./angular/?layout=4#/app/home" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With