// List of extensions for static files
$exts = 'txt|png|gif|jpe?g|shtml?|css|js|ico|swf|flv|cgi|bat|pl|dll|exe|asp|xml';
// It is not an imagecache path, which we allow to go through Drupal
if (!strpos($_SERVER['QUERY_STRING'], 'imagecache')) {
// It is not our main feed page
if ($_SERVER['QUERY_STRING'] != 'rss.xml') {
// Is it a static file?
if (preg_match('/\.(' . $exts . ')$/', $_SERVER['QUERY_STRING']))
// Just send a 404 right now ...
{
header('HTTP/1.0 404 Not Found');
print '<html>';
print '<head><title>404 Not Found</title></head>';
print '<body><h1>Not Found</h1>';
print '<p>The requested URL was not found on this server.</p>';
print '</body></html>';
exit();
}
}
}
1More
Drupal: Programmaticaly creating nodes | Unofficial, unsactioned stuff out of Byte Craft - 2 views
Drupal Developer's Toolbox - Smashing Magazine - 4 views
‹ Previous
21 - 40
Next ›
Last »
Showing 20▼ items per page