mercredi 17 juin 2020

.htacces folder name with same file name?

I have a file in my webpage called news. I did not write .html the end of the file, is this still correct? (the browser shows like html) I want to make a folder in my server with the same name and put the articles there.

For example: www.example.com/news ->>> this shows the main news page https://ift.tt/2zG2vDF --> this shows the article

If a user type www.example.com/news or www.example.com/news/ both must show the main news page. In my webserver, I made all files without any extension.

I have read previous Q/A -s from this page and other pages and I have did not found a valid soulution to my problem? Can I even modify the .htacces file in this way? Or I approach the problem in the wrong way?

Do I require a database or I just need files if I want to write articles? Where can I find standard documentation for a webpage with articles and news?

Thanks very much your help




Aucun commentaire:

Enregistrer un commentaire