This is a secure method to debug your apache from within php
- create a file called phpinfo.php in your / directory
the contents of phpinfo.php
<?php phpinfo(); ?>
Use this for your .htaccess file.
Options +FollowSymLinks ErrorDocument 404 /phpinfo.php
Now instead of getting a 404 error you will see debug information which will help you find out what the problem is.
Cd-MaN pointed out a security problem this method has, it reveals sensitive info to anyone who requests phpinfo.php.
Also, you better use it only as a temporary measure, because it reveals many sensitive information about your server (eg. delete it after you done debugging)
This only allows the user from IP address 18.104.22.168, everyone else is redirected to http://www.domain.com
ErrorDocument 403 http://www.domain.com Order deny,allow Deny from all Allow from 22.214.171.124
Same thing only uses .htaccess. Change your phpinfo.php file to the following
<?php ob_start(); phpinfo(); $debugger = ob_get_clean(); if ($_SERVER['REMOTE_ADDR'] == '126.96.36.199') echo $debugger; ?>