I am developing a website using php and the template.inc class. The problem is that I want to create a mini cms that allows the administrator to create an "html" page with these mysql attributes:
Table Name : Page
-----------------
id :auto-icremented)
name :varchar
In architecture, if he created page number "5", the URL
"ww.mywebsite.com/index.php?id=5".
But this is not very aesthetically pleasing, as I am very bad at rewriting url, even if I read a lot of manuals, I want to type the name + "html" to access the page.
If we take an example
"www.mywebsite.com/index.php?id=5"
if the administrator created a page with the following values:
id : 5
name : 'home'
I want the user to be able to enter
"www.mywebsite.com/home.html"
and without redirecting as I want this last url to still display and become the official url.
,
, www.mywebsite.com/index.php?id=5 www.mywebsite.com/5.html... , , -, "" "home" (5 = > "home" ).
URL?
,
.