On a bookmark or typein, HTTP_REFERER won't be set - and your condition skips your includes in that case.
Code:
$referrer = $_SERVER['HTTP_REFERER'];
if( (stristr($referrer, 'domain.com')) || ($referrer=="") ) {
echo '<INSERT CODE>';
} else {
include $_SERVER['DOCUMENT_ROOT'].("/path/to/file.html");
}
Disclaimer: yes, there are better ways to write that at the expense of the code being less easily modified.