Forum Moderators: phranque
The un-clean URL is in this format:
http://www.example.com/pl.php?p=news_item.php§ion=news&id=93178 And I would like the clean URL to look like this:
http://www.example.com/news/93178 Here's what I have in my .htaccess file and it doesn't work:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^/?(news)/([a-zA-Z_]+)$ pl.php?p=news_item§ion=news&id=$1 [L]
</IfModule>
[edited by: jdMorgan at 12:18 am (utc) on Aug. 18, 2008]
[edit reason] example.com [/edit]
B. You are reusing $1 in the rewrite, but surely it is $2 that would contain the data you need (notwithstanding fixing point A above).
C. There's a stray .php in your unclean example URL that doesn't match anywhere in your rule.