How could I merge these into one line? I’m sure it’s possible.
RewriteRule ^forums$ pages/forum.php [L]
RewriteRule ^forums/([A-z]+)$ pages/forum.php?category=$1 [L]
RewriteRule ^forums/([A-z]+)/([A-z]+)$ pages/forum.php?category=$1&sort=$2 [L]
Note that you’re still supplying
categoryandsortto the PHP script, but they’ll be empty.I think you may have a problem with
[A-z]including unexpected characters. (Review your ASCII charset for details). Replace it with[A-Za-z]or[[:alpha:]]if that’s what you really want.