View Full Version : Rewriting dynamic URL to search engine friendly URL

05-15-2011, 02:56 AM
For my blog, my individual posts page's URL looks like this:


I would like to at least convert this dynamic URL into:


Eventually I replace "id" with the blog's title, but one step at a time! ;)

I've Googled tutorials, but none of them seem to be working.

My .htaccess file is as follows:

RewriteEngine On
RewriteCond %{HTTP-HOST} ^mydomain.com
RewriteRule (.*) http://www.mydomain.com/$1 [R=301,L]

RewriteEngine On
RewriteCond %{HTTP-REFERER} !^$
RewriteCond %{HTTP-REFERER} !^http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(css|gif|jpg|js|psd|png|zip)$ - [F]

RewriteEngine On
RewriteRule ^([^/]*)\.html$ /comment.php?id=$1 [L]

Can someone please point me in the right direction? Any and all help is appreciated :)