I have tried following code which works fine for me.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
using this, I can access the index.php by typing localhost/myProject/index only.
My question is, How can I take out .php from URL if I write localhost/myProject/index.php
I am doing this because I have created 100 webpages in my website and they are linked together, and now I do not want to show .php in browser and do not have time to change the code( due to short deadline :( ).
I am using LAMP stack and Apache's mod_rewrite is enabled.
sedscript for it, or a short-cut using your favourite text editor's find-and-replace function. If a deadline makes you do this wrong, then you've missed the deadline.