I'm having a problem with my rewrite rules.
RewriteRule blogs/$ /alpha/index.php?m=blog
RewriteRule blogs$ /alpha/blogs/ [R]
RewriteRule blogs/(.*)/$ /alpha/index.php?m=blog&p=name&name=$1
RewriteRule blogs/(.*)$ /alpha/blogs/$1/ [R]
RewriteRule blogs/(.*)/(.*)/$ /alpha/index.php?m=blog&p=post&user=$1&post=$2
RewriteRule blogs/(.*)/(.*)$ /alpha/blogs/$1/$2/ [R]
Some URLs would be: /alpha/blogs/dennis/Test_Blog_Post/
/alpha/blogs/dennis/
Now, with the Rules I posted, when I visit the latter page (the blog homepage) it works fine, the homepage is displayed. Here's the GET data:
Array ( [m] => blog [p] => name [name] => dennis/Test_Blog_Post )
When I visit the first link, a blog post, it shows the blog homepage again, but this time with no information, and a No Posts Found message. Here's the GET data:
Array ( [m] => blog [p] => name [name] => dennis/Test_Blog_Post )
When I change the rewriterules to the following, it gives the same error, only opposite. i.e. the blog post shows, but the homepage doesn't.
RewriteRule blogs/$ /alpha/index.php?m=blog
RewriteRule blogs$ /alpha/blogs/ [R]
RewriteRule blogs/(.*)/(.*)/$ /alpha/index.php?m=blog&p=post&user=$1&post=$2
RewriteRule blogs/(.*)/(.*)$ /alpha/blogs/$1/$2/ [R]
RewriteRule blogs/(.*)/$ /alpha/index.php?m=blog&p=name&name=$1
RewriteRule blogs/(.*)$ /alpha/blogs/$1/ [R]
I really appreciate any help with this.