I have a main page called index.php which has a header, navbar and footer ETC loading via include files.
The main-content.php area is the only part of the page that changes. The included files in this area match
with the navbar buttons, the Home button loads content/home.php, the about button loads content/about.php
PHP Code:
include "includes/header.php";
include "includes/navbar.php";
include "content/main-content.php";
include "includes/footer.php";
The problem is the url stays as my-domain-name/index.php all of the time.
Is there a way to load the content/main-content.php files into index.php
while changing the url in the address bar to my-domain-name/home.php,
or my-domain-name/about.php
I have an idea this can be done using .htaccess file however would like some advice
on how to go about it?
برچسب:
نویسنده: آیلین رضوانی
تاريخ: پنجشنبه
5 بهمن
1396 ساعت: 8:47