Lalita Tana Lalita Tana - 1 month ago 5x
HTML Question

how can i remove the .php extension from my php page

I'm trying to remove the extension from my PHP page, for an example,
, I want people be able to verify from

my code:

<?php session_start(); ?>
html lang="en"

meta http-equiv="Content-Type" content="text/html; charset=UTF-8"


According to this website:

Change your .htaccess file like this:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

You can do something similar, with the .html extension, except you change the last line to:

RewriteRule ^([^\.]+)$ $1.html [NC,L]

If you don't have a .htaccess file, do what @Cagy79 said:

You could make a directory /verification/ and put your script in an index.php.

In this way a user can go to www.yoursite/verification/ without the need of adding the index.php part