3 ms·
Unless page load times are affecting your browsing experience, why bother optimizing when a regular expression is so clear and simple.
by cakeface 18y ago
Unless page load times are affecting your browsing experience, why bother optimizing when a regular expression is so clear and simple.
- erlanger 18y agoYou know what, you're right. I was thinking of something like: if (strpos('http://digg.com/', $_SERVER['HTTP_REFERER'])) header('Location: whateverPage'); But that would block all traffic from Digg, including links in comments, etc. To perform the same check as the regex would require much more code. However, I stand by my Apache recommendation as the best option.