I have a website in different languages, where "James" is the hypothetical person that's logged in. It has this logic.
Spanish
www.example.com/es/Login.php
www.example.com/es/Account.php
www.example.com/es/UpdateAccount.php
www.example.com/es/Logout.php
I want to make it look like this
www.example.com/
www.example.com/James
www.example.com/James/UpdateAccount
www.example.com/James/Logout
Is this possible?
Use the following as your
.htaccessThis will redirect you to the requested page for example:
becomes
then load your language files based on the
$_GET['lang']parameter.And btw exposing the extension of your files is not harmful for your application's security.