ignore strings in URL

Discussion in 'General Scripting Chat' started by Mutikasa, Dec 10, 2012.

  1. Mutikasa

    Mutikasa Power Member

    Joined:
    May 23, 2011
    Messages:
    579
    Likes Received:
    207
    I'm not sure how to do this, with htaccess or javascript or anything else.
    I have links like this www.example.com/dl/jfij5/.
    When someone put like www.example.com/dl/jfij5/somefile.zip I want it to ignore anything after .../jfij5/ and redirect it to .../jfij5/index.php.

    How to do that?

    EDIT:
    i got it. put this in .httaccess:
    Code:
    RewriteEngine On
    RewriteRule ^dl/(.*)/.*$ dl/$1/index.php [L]
     
    Last edited: Dec 10, 2012