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} ^$ [NC] RewriteRule ^(.*)phps$$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:
  if ((
file_exists($page)) && (preg_match("/(.*).phps$/"$page))) {
  } else {
3. That's it! You're done!


1. The ".htaccess" file redirects all requested .phps files to http://<yoursite>/catchphps.php
2. "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