Runway - v3.2 Blog clean URL's return 404

  • Hi all,


    I'm trying to get the clean URLs working for the blog post urls. I've added

    Code
    1. RewriteRule ^news/([a-zA-Z0-9-/]+)$ /news/post.php?p=$1 [L]

    to my .htaccess file. and also changed the 'Blog post page path' setting to '/news/{postSlug}' as per the instructions, but just get a 404 message when I click through to the 'post' page. This is my full .htaccess file:

    Might be also worth mentioning that I've renamed the folder containing the blog page templates to 'news' (perch/templates/pages/news). So the page location and routes for the 'news list' page is '/news' which works fine. The page location and routes for the 'post' page is '/news/post.php'. Any help or guidance would be very much appreciated.


    Daz

  • dazglaser

    Changed the title of the thread from “Perch (Runway - v3.2) Blog clean URL's return 404” to “Runway - v3.2 Blog clean URL's return 404”.
  • Hi Hoops78,


    Thanks for your reply, it's very much appriciated.


    I can confirm it is Runway v3.2 & I have now updated post title to reflect that.

    I followed your instructions & removed all the rewrite rules in the htaccess file.

    used the settings you illustrated in your example but still get a 404 error.


    Can I just confirm the setting for 'Blog post page path' is '/news/{postSlug}' & 'Slug format' is '{postTitle}'?


    I really have no idea what is going on here. These are my settings:


  • Hi Hoops78,


    Thanks for that, I've now sorted the clean post url problem however, It seems to have generated a further problem.


    Now my Category links return seem to be not returning all the articles within that category. Have you ever seen this behaviour before?


    You can take a look here: https://edwardshoyle.co.uk/news


  • Thanks pal, All sorted & everything behaving correctly now.


    For others with the same problem:


    This was what I used in 'archive.php' template, which worked for me.


    because this didn't work.

    Code
    1. 'category' => perch_get('cat'),

    perch_get('cat') was only returning the category (general) and not the whole category slug (news/general). Hope that makes sense.


    I'd just like to thank Hoops78 for his input and help, it's very much appreciated.