I would like to rewrite from:
www.domain.de/123/hello
to:
www.domain.de/index.php?a=$1&b=$2
I have this rule:
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteRule ^([^/]+)/([^/]+)?$ index.php?a=$1&b=$2 [L,QSA,NC]
it works fine. But I also would like that it also works with the input:
www.domain.de/123
(Here I will get an 404 error.) The &b shout be empty in this case. How to achive this?