You don't specify the full path to the file in the rewrite rule, what you are specifiying is a new absolute URL or a URI relative to the web root. So if you want to make any URI go to a PHP file of teh same name, here is how you would do it:
RewriteEngine On
RewriteRule ^(.*) /$1.php [L]
No need to specify /home/myhome/public_html
here.
This is a basic example however, as typically, this is much too broad of a rule, as it would prevent you from serving up images or other actual files from the web root (they would all end up with .php
appended to the. So assuming this is actually what you want, you would commonly see something like:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) /$1.php [L]
This rule applies in cases when the URI does not match an actual filename or directory. Thus requests to /some_file.php
would not be redirected to /some_file.php.php
.