.htaccess makes my head hurt.

Discussion in 'Co-op Advertising Network' started by jazzylee77, Apr 26, 2005.

  1. #1
    I'm having trouble getting co-op ads to show on a php script site. I have the ads showing on other php sites on the same server, so I doubt it's a server issue.

    I suspect htaccess is the problem. The folloing htaccess file is necessary for url rewriting of the script.

    RewriteEngine On
    RewriteRule ^index.html$ index.php
    
    RewriteRule ^(.*)/(.*)-search-(.*)-(.*)-(.*).html index.php?Operation=ItemSearch&SearchIndex=$1&$2=$3&Sort=$4&ItemPage=$5 [QSA,L]
    RewriteRule ^(.*)/(.*)-search-(.*)-(.*).html index.php?Operation=ItemSearch&SearchIndex=$1&$2=$3&Sort=$4 [QSA,L]
    RewriteRule ^(.*)/(.*)-search-(.*).html index.php?Operation=ItemSearch&SearchIndex=$1&$2=$3 [QSA,L]
    RewriteRule ^(.*)/browse-(.*)-(.*)-(.*).html index.php?Operation=ItemSearch&SearchIndex=$1&BrowseNode=$2&Sort=$3&ItemPage=$4 [QSA,L]
    RewriteRule ^(.*)/browse-(.*)-(.*).html index.php?Operation=ItemSearch&SearchIndex=$1&BrowseNode=$2&Sort=$3 [QSA,L]
    RewriteRule ^(.*)/browse-(.*).html index.php?Operation=ItemSearch&SearchIndex=$1&BrowseNode=$2 [QSA,L]
    RewriteRule ^(.*)/(.*).html index.php?Operation=ItemLookup&ItemId=$1 [QSA,L]
    RewriteRule ^(.*).html?$ index.php?SearchIndex=$1 [QSA,L]
    Code (markup):
    I've tried inserting the coops suggested htaccess line both at the begining and end of this file. Since I only have about an hour in the evenings to look at this stuff I'm not likely to figure this out till I have more time on my hands again. Something about htaccess is mindnumbing to me. But then again maybe it's something else.
     
    jazzylee77, Apr 26, 2005 IP
  2. jazzylee77

    jazzylee77 Peon

    Messages:
    578
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I know I didn't give enough info for anyone to help here last night! But I had some time to puzzle it over today and figured it out. Fixed the subfolder path in the htaccess file.
     
    jazzylee77, Apr 27, 2005 IP