Chima Chima - 1 month ago 5x
PHP Question

I need some help rewriting a url on a shared hosting platform (Perch CMS)

i've been working on this all day and haven't found anything that works. my current url is

and i'd like it to look like this

I'm currently using this

RewriteEngine on

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

But it hasn't worked, any ideas?


try it in root directory,

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blog/([\w-]+)$ blog/post.php?s=$1 [QSA,L]