$30 to he who gives .htaccess solution!

Discussion in 'Programming' started by itnashvilleCOM, Jul 31, 2008.

  1. #1
    My .htaccess guy is out for the week, I need help.

    I need to keep this directory structure as the user navigates my directory:

    /region/city/category/page/t/

    I tried this:

    
    RewriteEngine on
    RewriteBase /JOB/
    
    RewriteCond %{REQUEST_URI} !/$
    RewriteCond %{REQUEST_URI} !\.
    RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
    
    RewriteRule ^(.*)/$ directory.php?region=$1 [L,QSA]
    RewriteRule ^(.*)/(.*)/$ directory.php?region=$1&city=$2 [L,QSA]
    RewriteRule ^(.*)/(.*)/(.*)/$ directory.php?region=$1&city=$2&cat_name=$3 [L,QSA]
    RewriteRule ^(.*)/(.*)/(.*)/(.*)/$ directory.php?region=$1&city=$2&cat_name=$3&p=$4 [L,QSA]
    RewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)/$ directory.php?region=$1&city=$2&cat_name=$3&p=$4&t=$5 [L,QSA]
    
    Code (markup):
    But only the first link works right. The others dont pass the variables correctly. I will pay $30 (paypal) for the solution. Need imediately.

    The process:

    The user chooses a region, next page chooses a city, next page chooses a category, then next is pagenumber, then a last variable named $t.
     
    itnashvilleCOM, Jul 31, 2008 IP
  2. crazyryan

    crazyryan Well-Known Member

    Messages:
    3,087
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    175
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    The L you have within the [] means stop the rewrite process from then on.
     
    crazyryan, Jul 31, 2008 IP
  3. itnashvilleCOM

    itnashvilleCOM Banned

    Messages:
    176
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    ah, thanks I will try that!
     
    itnashvilleCOM, Jul 31, 2008 IP
  4. CarcaBot

    CarcaBot Active Member

    Messages:
    389
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    This shold work fine:
    Options +FollowSymLinks
    RewriteEngine On 
    RewriteRule ^(.*)/ directory.php?region=$1 [QSA,L]
    RewriteRule ^(.*)/(.*)/ directory.php?region=$1&city=$2 [QSA,L]
    RewriteRule ^(.*)/(.*)/(.*)/ directory.php?region=$1&city=$2&cat_name=$3 [QSA,L]
    RewriteRule ^(.*)/(.*)/(.*)/(.*)/ directory.php?region=$1&city=$2&cat_name=$3&p=$4 [QSA,L]
    RewriteRule ^(.*)/(.*)/(.*)/(.*)/(.*)/ directory.php?region=$1&city=$2&cat_name=$3&p=$4&t=$5 [QSA,L]
    PHP:
     
    CarcaBot, Jul 31, 2008 IP
  5. itnashvilleCOM

    itnashvilleCOM Banned

    Messages:
    176
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    Didn't work and made the pics int he design disappear
     
    itnashvilleCOM, Jul 31, 2008 IP
  6. Shoro

    Shoro Peon

    Messages:
    143
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    Try reversing the order of the rewrite rules.
     
    Shoro, Jul 31, 2008 IP
  7. crazyryan

    crazyryan Well-Known Member

    Messages:
    3,087
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    175
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #7
    Was your reply to mine or sicario's post?
     
    crazyryan, Jul 31, 2008 IP
  8. itnashvilleCOM

    itnashvilleCOM Banned

    Messages:
    176
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #8
    smartie19889 from namepros got it:



    Peace,
    Jay H. DiLegge
     
    itnashvilleCOM, Jul 31, 2008 IP