Hey guys. I’m working on a site for myself that acts similar to wordpress.
I have this file- posts.php, so to see each post the correct url will be: /posts/post-name (I use the following rewrite):
RewriteRule ^post/([^/]+).php /post.php?$1 [NC]
I also use a rewrite that allows me to leave out the .php extension.
And this works fine.. But I wanted to make it more specific for each post i.e., /rant/post-name without making a rant.php file to do so. So i wrote this in my htaccess file:
RewriteRule ^rant/([^/]+).php /post.php?$1 [NC]
I get a 404, and the server doesn’t point towards the post.php file and it tries to load /rant/post-name (which doesnt actually exist) yet, the first code still works no problem…
what am I doing wrong?