如何使我的CMS系统与SEO友好的URL一起工作

i got a question abount seo friendly urls.

Manly, i would like to know whats the best way to get my system running with seo friendly urls. i have programmed my own cms system which is working at the moment with url like this:

/content.php?contentid=ID

On every content page you can change the Meta-Tags.

Every LINK which is generated in my CMS follows this structure. If i want to use SEO friendly URLs changing every link, or code, where a link is generated, might be a bad idea. So i am looking for a nicer way. Is there any commonly used way to handle this?

My first idea was to automatically generate a new .htacces file with ModRewrite after the MetaTags of a Contentfile have been changed. So the SEO friendly URLs are recognized by the system. To get the LINKs on every page working i was thinking about checking the current url and redirecting to the new seo friendly url at the beginning of the content.php file.

I dont know if this is the right way to work with seo friendly urls. How are other CMS Systems handling this issue? I would be thankful for any inspiration!

if you are using an framework(which i think you are) then you can use a .htaccess like this to send the new cleaner links in an $_GET to the framework:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]