I want to have \"pretty\" and SEO oriented URLs in my site.
I\'ve build up my own tiny framework for this site and almost everything is complete now.
One thing I
You'll need an .htaccess file (but you won't need to change it each time you add a page):
RewriteEngine On
#RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /index.php?url=$1 [QSA,L]
Now in your index.php
you can access the requested url in $_GET['url']
, map it to the correct file and then include it.
Note: Put the RewriteBase
comment in there in case you need to uncomment it as some configurations require this.