I have a simple .htaccess file
RewriteEngine on
RewriteRule ^[^-]*-(.*)$ http://example.com/$1 [R]
RewriteRule ^[(template)(internal)(stuff)(files)] - [L]
RewriteRule ^([^/\.]+)/([^/\.]+)/?$ index.php?category=$1&page=$2 [L]
RewriteRule ^([^/\.]+)/?$ index.php?page=$1 [L]
RewriteRule ^/$ index.php?page=news [L]
And when I request for http://example.com/foo/bar everything is okay – Apache2 redirects to http://example.com/index.php?category=foo&page=bar but when I request for http://example.com/aoo/bar or http://example.com/zoo/bar (when category name begins with a or z) it doesn’t get redirected – off by one error?
.htaccess tester http://htaccess.madewithlove.be also does it.
Can anyone figure it out?
EDIT:
aoo/bar – 404; boo/bar – index.php; coo/bar – index.php; doo/bar – index.php; eoo/bar – 404; foo/bar – 404; goo/bar – index.php; hoo/bar – index.php; ioo/bar – 404; joo/bar – index.php; koo/bar – 404; loo/bar – 404; moo/bar – 404; noo/bar – 404; ooo/bar – index.php; poo/bar – 404; qoo/bar – index.php; roo/bar, soo/bar, too/bar – 404; uoo/bar, voo/bar, woo/bar, xoo/bar, yoo/bar – index.php; zoo/bar – 404
Your second rule is FUBAR. Figure out what you want it to do, and try again.