Redirect all users to LABS all the time
The following code will redirect all your visitors to LABS. There are two flavours, the second being superior because it will work on all pages but requiring the Custom Javascript feature (at time of writing this is only available on Labs, so a bit pointless yet)...
1) a version you can paste into any page under Admin > Website > Pages...
<script charset="utf-8" type="text/javascript">
document.observe("dom:loaded", function() {
// redirect to LABS (if not already there)
if (window.location.href.indexOf('/labs') == -1)
{
window.location.href = ENVIRONMENT.CurrentRoot + '/labs'
}
});
</script>
2) The same script but without the script tags which you can use with the forthcoming Custom Javascript feature (Admin > Website > Custom Javascript)...
document.observe("dom:loaded", function() {
// redirect to LABS (if not already there)
if (window.location.href.indexOf('/labs') == -1)
{
window.location.href = ENVIRONMENT.CurrentRoot + '/labs'
}
});
Obviously Labs comes with all the usual disclaimers, make sure you see the following article before you start using it: All about Labs/Beta/Production
Please sign in to leave a comment.
Comments
0 comments