I am working on a webpage project. I decided to use Apache, PHP (5.1.7, the version imposed by my service provider) and Dwoo (templating) for this.
I want to redirect urls to my templates. I know that there are many frameworks that do such things. I'm just wondering if there is a good way to achieve this.
I created my project as follows:
- src / dwoo - Dwoo files
- index.php - This should handle routing. Currently, it simply displays the first page of the site using the template.
- templates - Templates that represent actual pages.
There is a minimum amount of business logic (no real model). All these are just pretty static pages. Using templates simplifies maintenance work (inheritance, i.e.).
Any idea how to configure routing in this case? I assume that ideally, each given URL should route through index.php, which then somehow decides which template to render (i.e. / Category / pagename will appear in the / category / pagename.tpl templates).
php url-rewriting url-routing apache dwoo
Juho vepsรคlรคinen
source share