problem with code redirects Association
Page 1 of 1
problem with code redirects Association
- Code:
(function() {
var html_page = '/h10-Page',
link_change = true,
redirect = true;
$(function() {
var regex = new RegExp(html_page);
// link change
if (link_change && !regex.test(window.location.href)) {
$('a[href^="/login"], a[href^="http://' + window.location.host + '/login"]').attr('href', html_page);
}
// redirect to classic if login page isn't available
if (!document.getElementById('fa_form_container') && regex.test(window.location.href)) {
window.location.href = '/login#login_classic';
}
});
// login redirection
// saves redirect location so you're taken to the correct page upon login
if (/\/login\?redirect/.test(window.location.href)) {
my_setcookie('fa_login_form_redirect', window.location.search.replace(/.*?redirect=(.*?)(?:&|$)/, '$1'));
}
// redirect
if (redirect && /\/login/.test(window.location.href)) {
if (/login_classic/.test(window.location.hash) || /admin=1/.test(window.location.href)) return;
window.location.href = html_page;
}
}());
I put this but it operates with the connection
good night!
Similar topics
» Hi, I have a problem with my intropage. I placed a link in the intropage to my portal, but then it redirects back to the intro!
» Runescape Association Review
» Reset Forum Profile Facebook Association
» Code problem
» Problem with BB Code...
» Runescape Association Review
» Reset Forum Profile Facebook Association
» Code problem
» Problem with BB Code...
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum