I'm trying to create a wix page which will redirect all users that link to it to an external URL.
I tried adding the code below as a "html wix app" but it didn't worked.
<meta http-equiv="refresh" content="0; URL=http://www.my-new-url.com">
I'm trying to create a wix page which will redirect all users that link to it to an external URL.
I tried adding the code below as a "html wix app" but it didn't worked.
<meta http-equiv="refresh" content="0; URL=http://www.my-new-url.com">
You can use wix-location from Wix Code, for this. An example of using it to navigate to an external URL is:
import wixLocation from 'wix-location';
// ...
wixLocation.to("http://www.my-new-url.com");
When you insert an HTML "module" into Wix, it is actually inserted into an iframe on the page rather than the page itself.
Fortunately, the iframe is hosted at the same domain, so you don't have to deal with cross-domain issues. Therefore, this code, when inserted into an HTML module on a Wix page, successfully redirects the parent:
<script type="text/javascript">
window.parent.location.href = "http://www.my-new-url.com"
</script>
The above code:
<script type="text/javascript">
window.parent.location.href = "http://www.my-new-url.com"
</script>
works on my wix site: https://www.lemon-sin.com.au/ redirects to director's linkedin account
Maybe try:
You left out a " at the end. I hope this helps!
Try:
Try this: