I am using direct paths for downloading files from my site. the link is something like this
http://www.site.com/download.php?dir1/dir/dir3/file.doc
i want to wrap it with mod rewite rules so that only below link should be appeared
file, dir and dir3 are variable.
what i’hv to do in my .htaccess file?? Any Idea??
A simple redirect would be:
This will take any request for something in the ‘artificial’ download directory and route it to the real location.
You can add more complex rules stripping out filetypes etc depending on your needs, or redirecting a ‘name’ to a filename etc etc..
e.g:
This would have an artificial PDF folder containing a filename ex the extension, routing to a .pdf doc….you can shape the redirect any way you like really…depends on the format you prefer