Useful article in places, but rather bemused about the methods posited for redirection? Javascript is wildly inappropriate if your primary concern is unnecessary bandwidth consumption (mentioned in the preceeding paragraph) – considering that Javascript won’t even be excuted until after page load. And performing blanket redirects with no consideration for specific page requested (as per your PHP example) is a usability nightmare.
Why no .htaccess? Surely by far the most appropriate solution.
Useful article in places, but rather bemused about the methods posited for redirection? Javascript is wildly inappropriate if your primary concern is unnecessary bandwidth consumption (mentioned in the preceeding paragraph) – considering that Javascript won’t even be excuted until after page load. And performing blanket redirects with no consideration for specific page requested (as per your PHP example) is a usability nightmare.
Why no .htaccess? Surely by far the most appropriate solution.