Forum
Clean URLs in Blog
Hi,
I've been following these steps for clean URLs on my blog: https://docs.grabaperch.com/addons/blog/examples/clean-urls-perch/
Got everything to work except preview an draft. It automatically adds /preview to the URL when clikcing on "Preview Draft", and the guide says that should do it. Any suggestions then?
The guide says
Have you done that?
Show us your current rules if you have...
I have not set up any rules. The preview button already sends me to mydomain.com/blog/blog-title/preview.
You need to set up some rewrite rules on your server to handle those URLs.
Sorry, I meant .htaccess rules.
What happens now when you click on mydomain.com/blog/blog-title/preview ?
You need to set up a .htaccess rule to mydomain.com/blog/post.php?s=blog-title&preview=all
I get my 404 error page when i click on mydomain.com/blog/blog-title/preview. Is there a guide on how to set up this specific preview rule in .htaccess?
Yes, in the article you linked to in your original question above.
You mean this?
Try this
Got that to work but missing my stylesheet. Thanks Stephen!
What if I use Perch Runway code in my .htaccess? I also have a few sites with the blog app on my root folder, not inside a "blog"-folder.
Just make sure your css and js links are from root, that should fix it
NOT
That should work, thanks! Have to done the rewrite rules for preview drafts with Perch Runway?
Runway has routing built in, so you need to set up a route in the Control Panel.
What would this routing look like in Control Panel? Can you give me an example based on the .htaccess rule.
Are you using Perch or Runway?
I'am using Runway.
There's not of routes examples here: https://docs.grabaperch.com/addons/blog/runway/config/
Thanks! Sorry missed that page.