htaccess help please

Discussion in 'Apache' started by Leo727, Sep 16, 2006.

  1. #1
    Hello,

    Can someone please tell me how to remove ?u= from the end of an URL?

    The ?u= should only be removed if it is at the end of the URL with nothing after it. For example if the URL ends with ?u=test then it should not be rewritten.

    Thanks,
    Leo
     
    Leo727, Sep 16, 2006 IP
  2. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #2
    I suspect this more of issue with the script you are using then with Apache.

    Mod rewrite will rewrite the URLs to something more friendly. That would completely eliminate the ?u= part.
     
    Colbyt, Sep 16, 2006 IP
  3. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #3
    Just edit the script to take it out.
     
    Nintendo, Sep 16, 2006 IP
    Leo727 likes this.
  4. Leo727

    Leo727 Active Member

    Messages:
    161
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Thank you. Unfortunately in this case I can't use rewrite to remove the ?u=, but I used a str_replace to remove only empty ?u= from the output, works great. Thanks for the suggestion.
     
    Leo727, Sep 17, 2006 IP