Forum

Thread tagged as: Problem, Configuration, Blog

Blog only loading blog index.php page and no other pages

Regardless of whether I'm looking at the blog list, category, tag or archive the default blog page is showing on my site. Including if I try to force a 404 error. I believe I've got my URLs, slug and htaccess settings set up correctly. But as it's not throwing any errors it's difficult to debug.

My blog path is /blog/{postSlug} My slug format is %Y/%m/{postTitle}

and in the htaccess file I have set the following mod.rewrite settings:

RewriteRule ^blog/page/([0-9]+)/{0,1}$ /blog/archive.php?page=$1 [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/author/([a-zA-Z0-9-/]+)/([0-9]+)/{0,1}$ /blog/archive.php?author=$1&page=$2 [L]
RewriteRule ^blog/author/([a-zA-Z0-9-/]+)$ /blog/archive.php?author=$1 [L]
RewriteRule ^blog/archive/([a-zA-Z0-9-/]+)/page/([0-9]+)/{0,1}$ /blog/archive.php?year=$1&page=$2 [L]
RewriteRule ^blog/archive/([a-zA-Z0-9-/]+)$ /blog/archive.php?year=$1 [L]
RewriteRule ^blog/archive/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)/page/([0-9]+)/{0,1}$ /blog/archive.php?year=$1&month=$2&page=$3 [L]
RewriteRule ^blog/archive/([a-zA-Z0-9-]+)/([a-zA-Z0-9-]+)$ /blog/archive.php?year=$1&month=$2 [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] 
## This needs to be below the catch all, otherwise blog/archive -> blog/archive.php fails
RewriteRule ^blog/([0-9]+)/([0-9]+)/([a-zA-Z0-9]+)$ /blog/post.php?s=$1/$2/$3 [L]
RewriteRule ^blog/([0-9]+)/([0-9]+)/([a-zA-Z0-9-/]+)/preview$ /blog/post.php?s=$1&preview=all [L]
RewriteRule ^blog/rss.xml$ /blog/rss.php [L]

Can anyone spot anything obvious that I'm doing wrong?

The web page is: https://www.onlinebusinessstartup.co.uk/blog - as you can see, no matter what you put after the /blog in the url it just defaults to the blog home page!

Appreciate any help that anyone can offer

Kind regards

Robin

Robin Waite

Robin Waite 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Are those all of your rewrite rules in total?

Hi Drew, i Finally realised that I'm using Perch Runway and don't need all of those rewrite rules. That had me stumped for some time!