Poster Pretty URLs Problem


I’m using RW 8.9.3, Stacks 5.1.2 and STH Clean Blog template and Poster 2.7.1.

I have checked the “Pretty URLS / HTaccess Rewrite”.

My .htaccess has the following code in:

RewriteEngine on
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteCond %{HTTP_HOST} ^simonsmailus\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.simonsmailus\.com$
RewriteRule ^/?$ "https\:\/\/simonsmailus\.com\/" [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule posts/author/(.*) /posts/index.php?author=$1 [L,NC,QSA]
RewriteRule posts/category/(.*) /posts/index.php?category=$1 [L,NC,QSA]
RewriteRule posts/date/(.*) /posts/index.php?date=$1 [L,NC,QSA]
RewriteRule posts/search/(.*) /posts/index.php?search=$1 [L,NC,QSA]
RewriteRule posts/tag/(.*) /posts/index.php?tag=$1 [L,NC,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule posts/(.*) /posts/index.php?post=$1 [L,NC,QSA]

I’m using the markdown folder option and the posts are in
My web address in the project is set to:
I have two md files in the posts folder that appear on the homepage.

After the site is published when I click one of the posts I get a 404 not found error. The URL appears to be the prettified version.

How can I find out why the posts are not appearing please?

Does the advanced setting in RW need to have Tidy website links checked or unchecked? Does this make any difference as it doesn’t appear to when toggling and re-publishing.

I have tested in several browsers and cleared cookies.

I don’t see anything under, only a 404 error.

The folder is definitely there:

As usual I’ve no doubt missed off something rudimentary! I just can’t find what.

As reference:

Use the following htaccess code in your main htaccess file. Replace blogpage with your actual blog page name or folder structure.

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule blogpage/author/(.*) /blogpage/index.php?author=$1 [L,NC,QSA]
RewriteRule blogpage/category/(.*) /blogpage/index.php?category=$1 [L,NC,QSA]
RewriteRule blogpage/date/(.*) /blogpage/index.php?date=$1 [L,NC,QSA]
RewriteRule blogpage/search/(.*) /blogpage/index.php?search=$1 [L,NC,QSA]
RewriteRule blogpage/tag/(.*) /blogpage/index.php?tag=$1 [L,NC,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule blogpage/(.*) /blogpage/index.php?post=$1 [L,NC,QSA]

It must be checked.

This is now checked, but still the error.

My blog page is actually the root domain, ie home page. The posts are stored in root/posts.

Should blogpage be my root domain or my root/posts?

I don’t understand. It is irrelevant in which folder the post md files are stored.

If the RW project is published to the root of the domain, and your home page (/) contains the Poster Stack, above htaccess must be adapted to work on root instead of a subpage called “blogpage”.

You do not have a page called post. You will never have one with your setup.

Do you really want to have to blog in the root (/), or in /posts? If later one, you need to create another page in your RW project with folder set to /posts and place the Poster stack there instead of the home page.

Thanks Jannis.

This is a blog site so it seems to make sense. There will be other pages like an about, but the main point of the site is the blog.

So that I can understand this correctly. Poster tends to be set up in a subpage in RW?

I’ve removed the .htaccess code and unchecked prettify urls and the pages appear.

Not necessarily. We can make the htaccess file work for you so that the blog is inside the root (/) of the domain.

If there will be other pages inside the project as you’ve said it might be easier to put the blog page inside a subfolder (like /blog).

Just let me know.

Thanks Jannis,

If I make the blog a subpage, can I get the latest posts on my homepage?

Yes, with using the supplied RSS importer stack from Poster, or RSS reader stack from another developer.

Search for RSS inside Stacks HUD.

Here is a document for getting the RSS feed, in your case (now) or in future something like

Thank you kind sir, you have been most helpful!

1 Like

Will Poster generate an RSS feed if you are only using a Markdown folder?

Yes, it does not matter which kind of posts you’re using, either with post child stacks or markdown files (or even mixed). You always have a dynamic RSS feed with the current posts.