Forum
Blog posts in the root folder
Instead of putting blog posts in a /posts/ folder I want to run them from the root of the site. So:
https://www.domain.com/name-of-blog-post
instead of
https://www.domain.com/posts/name-of-blog-post
I got it working by adjusting this line in the .htaccess folder
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^([a-zA-Z0-9-/]+)$ /post.php?s=$1 [L]
</IfModule>
and changing the blog post page path to: {postSlug} in the blog settings.
This worked but when I tried to access the Perch Control Panel it wouldn't let me and just reverted to the home-page of the site.
Any ideas on how to make this work?
You need to exclude the
/perch
folder because the rule you have for the post rewrite will match it.Works brilliantly! Thanks for that.