We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
[ C ] Redirect S11 & W11 to Custom Domains automatically
Topic Started: Dec 13 2011, 05:02 PM (651 Views)
paradise.engineering
Member Avatar
Lowpoly Workshop Founder
[ *  *  * ]
Zetaboards Java Script Request

Redirect S11 & W11 to Custom Domains automatically

thanks
Offline Profile Goto Top
 
Nicolas-ZNR
Member Avatar
Member
[ *  *  *  *  *  *  * ]
In the future remember to use the General Requests Guidelines.

This is the code I use on HNZ to accomplish this:
Code:
 
<script type="text/javascript">
if ( location.href.match(/w11/) ) {
location.href = "http://hogwartsnewzealand.com/"+location.href.split('Hogwarts_NZ/')[1];
}
</script>


Where you should replace:
Red italicized text with your custom domain and green bolded text with the default name of your community.
If your default ZB URL is w11.zetaboards.com/BOARDNAME/ you would put BOARDNAME in place of the green.
This not only forces users to use the custom domain and not the default one while they both work, but it also redirects them to whatever page they were on before it redirected them. :)
Edited by Nicolas-ZNR, Dec 13 2011, 06:05 PM.
Offline Profile Goto Top
 
lightfire
Member Avatar
littlegraycloud
[ *  *  *  *  *  * ]
Please use the request form next time. I will mark this as complete, you are free to create a new one if what Nicolas suggested does not work.

Completed!

Your request has been completed. If you have any questions or concerns regarding the state of your request, please feel free to contact me via PM.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Closed Requests · Next Topic »
Locked Topic