preventing access to php files using htaccess doesnot allow ajax to use php files i am using the following code in .htaccess to prevent access to php files from the browser

&lt;Files ~ "\.php"&gt;
Order allow,deny
Deny from all
&lt;/Files&gt;


the problem whit that is that when i deny access to php files ajax cannot use those php files either... how can i solve this... any help would be appreciated... thanks in advance... :)
I've no idea what you're trying to accomplish, but I believe you're seriously misguided about how a PHP-based website works.

If you set up .htaccess-rules to stop the browser from accessing any PHP-file, it is not only ajax that will be affected.  Every page on your Drupal website will return 403 to any visitor, including index.php in the root directory.  I doubt that you want this.

If you've got Apache configured correctly for PHP, the contents of a PHP-file are never transmitted to the client - only the result of processing it server side.  Just point your browser to sites/default/default.settings.php to see how this works.  Unless you've really munged your Drupal configuration, you should not need to do anything to stop the PHP-files from being browsed.