this is my .htaccess:
RewriteRule ^([^/]*)(.*) index.php?page=$1&var1=$2&var2=$3 [QSA,L]
example of my problem:
echo ‘page: ‘ . $_GET;
echo ‘var1: ‘ . $_GET;
echo ‘var2: ‘ . $_GET;
echo ‘var:3 ‘ . $_GET;
Url : domain.com/page1/asd/123/d2d
So as you can see the / wont separate the *vars* so i would like some help with that :)
Thanks for any help you can provide!
Do you have var1 – 3 on all pages ?
If not I would just rewrite to **index.php?page=$1** and then make php deal with the rest
$uri = $_GET;
$has = explode(“/”, $uri );
print_r( $has, true );
Url : **domain.com/page1/var1/var3/zxy/more-here** =
 => pageX
 => a
 => b
 => zxy
 => more-here
I don’t know much about how .htaccess works with regular expressions but `^([^/]*)(.*)` reads to me as ‘start of string, capture anything without a slash, capture anything that follows’, which are exactly the 2 captures you’re getting.
You must be logged in to reply to this topic.