Drupal Blocks URL BasedDurpal provides various options 3 options to include a block based on the post url. Normally the first two are good enough however if you need more control you can use the third option i.e. writing a php block of code to return TRUE or FALSE implying whether to display or not display the block.

For example, if you don't want to display a block on url like admin/* , user/* & forum/* you can use the following snippet.

$match = TRUE;
$url = request_uri();
$pages = array('admin', 'user', 'home');
foreach($pages as $page){
if (strpos($url, $page)) {
  $match = FALSE;
return $match;

The following is the screenshot of the same this time as defined in the block configuration.

Selective include Drupal Block