How to add page restrictions for blocks in drupal?
In Drupal 7 you can use PHP code in the block's "Visibility settings."

Steps


Go to admin/modules and enable the PHP filter module


Go to admin/structure/block and click on "Configure"




Enter the following PHP code (including &lt;?php and ?&gt;) in the Page settings.