Question : Help with RewriteRule

I'm building a new website and new CMS and I want to incorporate lots of SEO friendly structures. One of them is using the RewriteRules in apache to create nicer looking URLs.

My news areas is accessed via

news.php - listing page
news-item.php?strSlug=[slug] - news item page

I wanted the news listing page to appear as just /news
and the news item pages to appear as /news/[slug]

so that news/nice-new-website would be rewritten as /news-item.php?strSlug=nice-new-website

So far I've torn most of my hair out. What am I doing wrong. Every time I try something the server just gives me the news.php page back with the news listing on it. My .htaccess file looks like this:
Code Snippet:
1:
2:
3:
RewriteEngine On
 
RewriteRule ^news/(.*)$ news-item.php?strSlug=$1 [L]
Open in New Window Select All

Answer : Help with RewriteRule

Okay, I figured it out. My listing page was called news.php and the rewrite was getting confused somehow, or maybe apache in general. Soon as I renamed news.php to news-listing.php and modified my .htaccess file to the code below it all worked.

Stand down experts!
1:
2:
3:
4:
RewriteEngine On
 
RewriteRule ^news$      news-listing.php
RewriteRule ^news/(.*)$ news-item.php?strSlug=$1 [L]
Open in New Window Select All
Random Solutions  
 
programming4us programming4us