Buying Quick .htaccess Fix please - :

Discussion in 'Programming' started by misohoni, Dec 14, 2011.

  1. #1
    Hi, could anyone help (and how much?).

    My setup is:
    /shoot.php?setID=90

    I'd like it to change to:
    /person1-shoot1/

    The Person1 and Shoot1 are the variables in the SetID...
     
    Last edited: Dec 14, 2011
    misohoni, Dec 14, 2011 IP
  2. Hostmasti

    Hostmasti Member

    Messages:
    281
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    38
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    Can you please elaborate more
     
    Hostmasti, Dec 14, 2011 IP
  3. jamesfletcher

    jamesfletcher Greenhorn

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #3
    RewriteEngine on
    RewriteRule ^product/([^/\.]+)/?$ product.php?id=$1 [L]

    Another example, rewrite from:

    www.yoursite.com/script.php?product=123 to www.yoursite.com/cat/product/123/


    RewriteRule cat/(.*)/(.*)/$ /script.php?$1=$2
     
    jamesfletcher, Dec 15, 2011 IP
  4. misohoni

    misohoni Notable Member

    Messages:
    1,717
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    200
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #4
    Doesn't work sorry, the page doesn't change.

    So you're saying:
    /shoot.php?setID=90

    RewriteRule ^shoot/([^/\.]+)/?$ shoot.php?setID=$1 [L]
     
    misohoni, Dec 15, 2011 IP
  5. jamesfletcher

    jamesfletcher Greenhorn

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #5
    Can you please provide me full URL? shoot is directory or only page name?
     
    jamesfletcher, Dec 15, 2011 IP
  6. Einheijar

    Einheijar Well-Known Member

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    3
    Trophy Points:
    165
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #6
    Just occured to me that he may think that the URLs in the script will change automagically with the htaccess rule.
     
    Einheijar, Dec 15, 2011 IP