i'm trying manage friendly urls .htaccess, works:
rewriteengine on options -indexes <filesmatch ".*\.(phtml)$"> order allow,deny deny </filesmatch> # if directory or file exists, use directly rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d # otherwise forward index.php rewriterule (.*) index.php?q=$1 works fine when loads mypage.com/x/y; php script converts string array, making each element thereof each chain between slashes founded.
when add get vars (for example: mypage.com/x/y?var=1), can take respective values (var=1 in example). how can fix it?
just change last line with:
rewriterule (.*) index.php?q=$1 [qsa] using [qsa] flag causes query strings combined.
Comments
Post a Comment