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…
This may not be related, but I’ve seen all kinds of things happen depending on what host you are on. For instance, Godaddy doesn’t seem to support htaccess at all (or so I’ve heard and somewhat experienced). I’m probably not being much help but just my 2 cents :)