Jump to content

Htaccess Rule Not Working


real_illusions

Recommended Posts

Hi all, I have a rule setup thats similiar to another that works, but this one doesn't, and I cant work out why. Rule is as follows: RewriteRule ^latestnews-([a-zA-Z]+)/?$ newsitem.php?item=$1 [NC,L] Where the ending variable is used to get a database item, and thus displays the right content on the page, and is also displayed in the friendly URL. For example: /newsitem.php?item=newsitem-goes-here would appear as: /latestnews-newsitem-goes-here But instead, I get a 404 error. Now, I have a similiar setup on another page but that uses PHP switch statements to determine the content as the amount of content is quite small compared to this one that uses a database. The un-friendly URL with the variable in works fine, displays the content all ok, its just when accessing the friendly URL that it all goes a bit wonky and spits out a 404. Any ideas?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...