Help on .htaccess

hi this is me joseph
and i watch ur video how to create robote.txt
now i want 2 ask how to hide file extension in url . i am using this bellow code it works fine with navigation menus but not working with my form action
this is .htaccess code

RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/s
RewriteRule ^(.*)$ $1.php

and there is form action code

search

" action=“search.php”

i hope u help me in. thanks

On which platform or CMS you are running your website?

PHP PDO mysql windowsOS
`
<input class="w3-input " placeholder="Enter name"name=“search” type=“text” style=“width:93%”>

search
`

Use this way to remove extension from the URL last. For remove .php from URL last.

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

If you want to remove .html last so simply change the above code last line.

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

Results Preview:
http://www.yourwebiste.com/Seo-training.html
to
http://www.yourwebiste.com/Seo-training

Hope that will help you!

thank for ur help on htaccess ur formula is working good. and i want to ask have u made any video on Admin panel security .

Thank you :slightly_smiling:
We will consider your feedback for future.
Happy today!