I have url example.com/lt.php/example
and want remove .php that will be example.com/lt/example
I try with htacces, but I think that's impossible
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ http://moliplante.com/folder/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^(.+)\.php([#?][^\ ]*)?\ HTTP/
RewriteRule ^(.+)\.php$ http://example.com/folder/$1 [R=301,L]
RewriteRule ^([^/.]+)$ $1.php [L]
Try this, hope it will work
This might work:
The first backreference would capture lt from lt.php and the second backreference would have example and php would be added to it.