I have a very simple php site which has recently been flagged by Google as being hacked. The problem seems to be that external links are being created to pages such as:
This loads the index.php file but without the CSS as the path is broken.
What I would like to do is have this result in a 404 error. Is the solution through an htaccess file or is there a simpler way?
I’ve tried just using<?php echo "Hello world"; ?>
with the same result, so I don’t think it is an issue with the php code.
I haven’t had this problem on other hosting companies and I am at a loss.