mardi 31 mars 2020

How to make a page that does not exist display a template file using .htaaccess file

I have seen this done before successfully but I am unable to replicate it. What I want to do it on my website I have a folder and in it is a template file lets call it template.html (folder/template.html).

What I am trying to do is if I was to link to folder/newpage.html, for example. the path will remain unchanged but it will display the contents off template.html.

This will allow me to dynamically update the details with details in my database vis js/php etc without having to create many pages when they will all essentially look the same, just different details.

I know it will involve the HTA access file, and I know how to redirect to another page. But keeping the page the same and just displaying the content of another is where I'm stuck.




Aucun commentaire:

Enregistrer un commentaire