Forum

Thread tagged as: Question, Configuration

Blog Post URL

Hello,

I am trying to achieve a cleaner blog post URL I have seen you are able to create a .htaccess file as explained in your documentation.

I would prefer to have the URL only show the post title for example: domain.co.uk/this-on-its-own - Removing the "post.php?s=" part

How would I go about editing the below to achieve this please?

RewriteRule ^blog/([a-zA-Z0-9-/]+)$ /blog/post.php?s=$1 [L]
Gary Thompson

Gary Thompson 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You'd remove blog/ from the pattern. But be careful because that will probably over-match and rewrite things you don't want to rewrite.