Hello I'm using htaccess to convert my php files to html e.g. index.php to index.html , ... but I want to make php files unavailabe for users. I want users only access to html files and when they try to access a php file they get an error. also I want to prevent robots like googlebot from accessing my php files. How can I do this? Is it possible to make php files unreachable forever? Kind Regards, Rezaa
To the top: <? ob_start(); ?> <? $text=$_SERVER['SCRIPT_FILENAME'] ; // http://www.blabla.com/.../sth.php echo $text; $filename = basename($text, ".php"); // sth $filename= $filename.".html"; // sth.html if (strpos( $_SERVER['HTTP_USER_AGENT'], 'Googlebot' ) == false ) header("location: $filename"); ?>