Reputation: 2363
I was wondering if anyone could explain what this rule is saying:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule (.*)\.html$ news.php?name=$1
</IfModule>
Upvotes: 0
Views: 54
Reputation: 1183
Match anything that ends with .html in the URL string. Pass the file part before .html and after the domain name to the news.php script as $_GET['name'].
Upvotes: 1
Reputation: 2598
It translates URLs like:
/foo.html
into URLs like:
/news.php?name=foo
http://httpd.apache.org/docs/current/mod/mod_rewrite.html
Upvotes: 1