Forum Moderators: phranque
RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)$ /index.php?keyworda=$1&keywordb=$2&parma=$3&parmb=$4 [L] RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)/([^/]+)/?$ /index.php?keyworda=$1&keywordb=$2&parma=$3&parmb=$4&parmc=$5 [L] RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)$ /index.php?keyworda=$1&keywordb=$2&parma=$3&parmb=$4 [L]
/?$
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /index.php?keyworda=$1&keywordb=$2&parma=$3&parmb=$4 [QSA,L] [edited by: penders at 12:26 pm (utc) on Jan 26, 2015]
RewriteCond %{QUERY_STRING} ^page=([0-9]{1,2})
RewriteRule ^([^/]+)/([^/]+)/([^/]+)/([^/]+)$ /index.php?keyworda=$1&keywordb=$2&parma=$3&parmb=$4&pageid=%1 [L] The only issue with my rewrite now is 'page' is always set... but I can always check to see if it's null instead.
if (empty($_GET['pageid'])) // pageid is omitted, set to empty string or is '0' $_GET['pageid'] is never NULL under normal conditions. It is either not set if omitted or is set to an empty string if passed with no value. RewriteCond %{QUERY_STRING} ^(?:page=([0-9]{1,2}))?