This is very simple, I don't know why any of us thought of this earlier: 1. Create a .htaccess file with this as its content:RewriteEngine on RewriteCond %{HTTP_HOST} ^agilo.acjs.net$ [NC] RewriteRule ^(.*)phps$ http://agilo.acjs.net/catchphps.php?page=$0 [L]Be sure to change the URLs (bold parts)! 2. Next, create a file called "catchphps.php" in your root folder of your site. Make this its content:3. That's it! You're done!<?
$page = $_GET['page'];
if ((file_exists($page)) && (preg_match("/(.*).phps$/", $page))) {
show_source($page);
} else {
echo "Error!";
}
?>
Explanation
1. The ".htaccess" file redirects all requested .phps files to http://<yoursite>/catchphps.php2. "catchphps.php" catches the name of the .phps file (?page=bla.phps).
3. "catchphps.php" checks to see if the file exists and ends with .phps (security).
4. "catchphps.php" shows the source of the .phps file.
The best thing is; the URL in the URL bar doesn't change!! :D