<?php if ($HTTP_SERVER_VARS['SERVER_PORT']=='80'){ // check to see if running on http include ("file.php"); } ?> This assumes Globals is switched on.