Why I can download any file except PHP files from a URL but I can download any from another site?

If your server is configured correctly, a request to a PHP file is forwarded to the PHP interpreter. It does not play a role if it is accessed directly, via a link or by clicking on it in a directory listing.

I visited both of your URLs. URL 2 shows an error message – an PHP error message. This file has definitely been processed by the PHP interpreter:

Fatal error: Call to undefined function add_action() in /home/nextgenl/public_html/wp-content/plugins/wp-import-txt/wp-import-txt.php on line 24

The first URL redirects to the main script, with the called file as parameter. It seems to be a Rewrite Configuration here. And there you are right, it should take place in your .htaccess.

For my wordpress installation, I use this .htaccess for URL rewriting:

<IfModule mod_rewrite.c>
   RewriteEngine On
   RewriteBase /
   RewriteRule ^index\.php$ - [L]
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteRule . /index.php [L]
</IfModule>