1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

htaccess and php variables

Discussion in 'Apache' started by Edynas, Jul 5, 2006.

  1. #1
    Hi,

    Is it correct that if php is instaled as a module it works different than if it's instaled as cgi?

    Reason why I ask is that I can't seem to pass a variable with htaccess to a php file in 1 server and it does with a different server.

    
    RewriteEngine on
    RewriteRule ^(.*).htm test.php?keyword=$1
    RewriteRule ^(.*).html test.php?keyword=$1
    RewriteRule ^(.*)/(.*).php test.php?keyword=$2
    RewriteRule ^(.*)/(.*).html test.php?keyword=$2
    RewriteRule ^(.*)/(.*).htm test.php?keyword=$2
    
    Code (markup):
    the variable keyword has no value if I test it with site1 but it does if i test it with site2

    If this is realy the problem what is the solution? If it's not the case what else could be wrong?

    regards,
    Edwin
     
    Edynas, Jul 5, 2006 IP