Mod_rewrite problem

software development

#1

I love mod_rewrite…so difficult to use :confused:

I have the following rules:
RewriteEngine On
RewriteRule ^books/([^/])$ /booklist/show.php?book=$1&page=1 [L]
RewriteRule ^books/([^/]
)/$ /booklist/show.php?book=$1&page=1 [L]
RewriteRule ^books/([^/])/([^/])$ /booklist/show.php?book=$1&page=$2 [L]

The problem is that I want to create a few redirect for
/booklist/
and
/books/
I want that if I don’t write anything after /books (or /books/ ) I got redirected to the homepage. I have no idea how to do that. I tried to do
RewriteRule ^books/([^/])$ /booklist/show.php?book=$1&page=$2 [L]
or
RewriteRule ^books/$ /booklist/show.php?book=$1&page=$2 [L]

But they both don’t work.

Cupons:[color=#0000CC]MAO_HALFPRICE[/color] : pay only half of the price (L1 plans only) MAO97 get 97$ back