In development, should we convert the .html or .htm file extension to .PHP? To implement the PHP session, and not to redirect if the session is destroyed?
I mean, in C# we use RedirectToPagePermanent
to keep the user to only access the pages the system will be redirected.
How about PHP?
for example process.
- Login Page
- If the user exists:
- Create a cache or session.
- Redirect to Main Page.
- if not then notify the user, and stays on the login page.
- On Main Page, there is a logout button.
- User clicks.
- Session destroyed.
- Redirect to the Login page.
- if the user clicks the back button of chrome, the main page will not be shown or redirected because there is no session.
So, in PHP, should I convert all the .HTML or .Htm file to .PHP?