I never really have used mod re write and I am trying to understand the best way to implement it. removing the .php extension. i found this code
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
problem is that if the link is to domain.com/index.php it wont re write it domain.com/index
Also if i do the link domain.com/index the person can still add the .php and it still works fine.
I would like to know the proper way.. do i have to hard code the urls in the html or is there something that can do it automatically?
I dont want them to be able to add the .php to the end