I’m trying to make a dynamic page which will show the content based on the URL but I’m wondering if it’s possible to make the URL more readable for the user.
So I have a page called work.php which will show a certain piece of work depending on the ID passed in the URL. So work.php?project=1 would show project 1.
Is there a way to achieve the the same effect using a URL more like http://www.website.com/work/projectname
look at this: .htaccess and mod_rewrite for apache
you can then process the url which stands in
$_SERVER['REQUEST_URI']** addendum **
for example I am using something like this in the
.htacessfile:So then I will always land on
index.phpwhere I will parse the URI and can use it as a distributer and router for my pages.