Hi, simple problem: I created a mod_rewrite rule RewriteRule ^(.*)-(.*)$ index.php?keyword1=$1&keyword2=$2 [L] #the url i want: mysite.com/keyword1-keyword2 Code (markup): How can i make that these 2 variables are printed out on access? something like: echo $1; echo $2; ?? Thanks for help
Try this: RewriteRule ^([^.]+)-([^.]+)$ index.php?keyword1=$1&keyword2=$2 [L] OR RewriteRule ^(.*?)-(.*?)$ index.php?keyword1=$1&keyword2=$2 [L]
hey thanks, i think the problem is on the php side: <? print $1; print $2; ?> PHP: .. how can i read these 2 variables mysite.com/keyword1something-keyword2something ?? All i want is to have them printed as: keyword1something keyword2something
You've to echo $_gets: echo 'keyword1: '.$_GET['keyword1'].'<BR />keyword2: '.$_GET['keyword2']; PHP: Regards