Forum
Blog URL re-writing, nearly working.. one issue I can't solve.
Hey!
Im loving Perch.. I have an issue with the posts though, I have imported my WordPress posts into Perch and all is good.
I have re-written the URL's and all is good, except when I go the the post categories, or tag archive pages the wont work with the pretty URL's.
They will only work with 'archive.php?cat=' but the blog itself and the single post pages all work with pretty URL's fine?
My blog structure is localhost:8888/blog/category/POSTTITLE
Im using these standard re-writes in the .htaccess.
RewriteRule ^blog/([a-zA-Z0-9-/]+)$ /blog/post.php?s=$1 [L]
RewriteRule ^blog/([a-zA-Z0-9-/]+)/preview$ /blog/post.php?s=$1&preview=all [L]
RewriteRule ^blog/category/([a-zA-Z0-9-/]+)/page/([0-9]+)/{0,1}$ /blog/archive.php?cat=$1&page=$2 [L]
RewriteRule ^blog/category/([a-zA-Z0-9-/]+)$ /blog/archive.php?cat=$1 [L]
RewriteRule ^blog/date/([a-zA-Z0-9-/]+)/page/([0-9]+)/{0,1}$ /blog/archive.php?year=$1&page=$2 [L]
RewriteRule ^blog/date/([a-zA-Z0-9-/]+)$ /blog/archive.php?year=$1 [L]
RewriteRule ^blog/tag/([a-zA-Z0-9-/]+)/page/([0-9]+)/{0,1}$ /blog/archive.php?tag=$1&page=$2 [L]
RewriteRule ^blog/tag/([a-zA-Z0-9-/]+)$ /blog/archive.php?tag=$1 [L]
Any help would be appreciated.
Thank you!
Kieran
When you use this pattern:
you can match multiple segments. I don't think you need the
/
in there. Try:Thanks for the reply!
wow.. that worked, I think :P
Thank you so much
Kieran