So I tried this
redirect banned users refresh technique to send banned users to a "503 Server Unavailable" error page. We want the banned user to think the server is down and go away.
Here is the problem:
The full vBulletin page must load in your browser before the meta refresh redirect can happen, even if it is set to 0. (It doesn't matter if you move the meta refresh to the
headinclude or
header template.) Depending on the browser, connection, etc. a user can easily see the standard vBulletin "Banned" error message for a second just before they are redirected to the other page. They may also be able to pull the original error page up using the BACK button.
That's a big problem if you are trying to deter SEO and backlinks spammers, who are registering and posting by hand and will be registering multiple accounts anyway.
So I am trying a
Javascript version of this same banned users redirect:
Code:
<if condition="$bbuserinfo['usergroupid'] == 8">
<script type="text/javascript"><!--
location.replace("http://yoursite.com/error.php");
//--></script>
<noscript>
<meta http-equiv="refresh" content="0;url=http://yoursite.com/error.php" />
</noscript>
</if>
This uses Javascript to instantly change the url location via the
location.replace function, but also includes the old meta refresh redirect in case the user has javascript disabled.
Since I'm not a Javascript expert, can someone else test this to see if the redirect is faster or tell me if there is a better Javascript call to do this url replacement with?