modRewrite and php

Discussion in 'Apache' started by Nikolas, Jun 20, 2006.

  1. #1
    Here is a problem I have.

    I use the above modrewrite rule to redirect subdirectories of a directory to a php script :


    RewriteEngine on
    Options +FollowSymlinks
    RewriteBase /
    RewriteRule dir/(.*)$  dir/index.php?screen=$1 [QSA,L]
    Code (markup):
    So it will redirect /dir/xxx to /dir/index.php?screen=xxx right?

    The problem is that php can't 'see' the screen in $_GET or $_REQUEST, so the only way to see what it passes is through $QUERY_STRING which does not helps much as it returns this :

    screen=index.php&screen=xxx
    Code (markup):
    Can you help me with this? Any response will be deeply appreciated.
     
    Nikolas, Jun 20, 2006 IP