I have a .htaccess file with the following rules:
RewriteRule ^(boards)/(.+)/(.+)/(.+)/(.+)/([^./+])/?$ index.php?param0=$1¶m1=$2¶m2=$3¶m3=$4¶m4=$5¶m5=$6 [NC]
RewriteRule ^(boards)/(.+)/(.+)/(.+)/([^./]+)/?$ index.php?param0=$1¶m1=$2¶m2=$3¶m3=$4¶m4=$5 [NC]
RewriteRule ^(boards)/(.+)/(.+)/([^./]+)/?$ index.php?param0=$1¶m1=$2¶m2=$3¶m3=$4 [NC]
RewriteRule ^(boards)/(.+)/([^./]+)/?$ index.php?param0=$1¶m1=$2¶m2=$3 [NC]
RewriteRule ^(boards)/([^./]+)/?$ index.php?param0=$1¶m1=$2 [NC]
RewriteRule ^(boards)/?$ index.php?param0=$1 [NC]
My question: would it be possible to combine those into just one rule? It’s pretty annoying to maintain like this…
If you can modify
index.php, you can do this:and parse
$_GET['url']yourself insideindex.php.Even better, you can do
and then parse
$_SERVER['REQUEST_URI']yourself inindex.php.