.htaccess redirect question

Posted by russp on Stack Overflow See other posts from Stack Overflow or by russp
Published on 2010-05-27T06:58:29Z Indexed on 2010/05/27 7:01 UTC
Read the original article Hit count: 163

Filed under:
|

I have a slight problem with .htaccess redirect.

I have a dynamic site with 2 levels of variables - content="type -(alpha)" and ID="number" but this is very not seo friendly what I really would like to create is a rewrite rule that generates a "friendly" url for serach engines & users alike. Very much like WordPress does.

Each ID is already unique (obviously) and on creation is creating a unique "permalink" field so for example ID=1 has a "permalink field" as "2009/10/27/page title" and ID=100 would be "2010/10/27 page title".

I would like folder/wall.php?content=type&ID=number to redirect to folder/permalink.php/html/htm (don't mind a non dynamic extension)

Any clues? - this is not right (I know) but it also "breaks" my css file

RewriteEngine On

RewriteRule wall/content/(.*)/ID/(.*)/ wall.php?content=$1&ID=$2
RewriteRule wall/content/(.*)/ID/(.*) wall.php?content=$1&ID=$2

© Stack Overflow or respective owner

Related posts about .htaccess

Related posts about rewriterule