url rewriting to mask a download url

Discussion in 'Apache' started by Objects, Dec 27, 2008.

  1. #1
    Hello professionals,
    all my files are located here
    http://www.domain.com/dir/dir2/dir3/file.123

    I want the use to get a url in the download link like this
    http://www.domain.com/dir2/dir3/file.123

    could anyone help me
     
    Objects, Dec 27, 2008 IP
  2. kulinar

    kulinar Member

    Messages:
    45
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #2
    Options +FollowSymlinks
    
    RewriteEngine On
    
    RewriteRule /([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/(.*) /dir/$1/$2/$3 [L]
    Code (markup):
    Try this one.
     
    kulinar, Jan 3, 2009 IP