View Full Version : rewriterule problem

12-30-2005, 03:30 AM
Hello, i had the following rewrite rule in my .htaccess which worked fine since all of the files were in the /uploads/ folder.
RewriteRule ^(uploads)/([a-zA-Z.0-9]+)$ /download.php?action=1&file=$2 [L]

I recently changed my upload script to create a random folder at every file upload and put the file in the random folder. The problem is that when people click on the link (www.mydomain.com/uploads/2340293/filename.rar.html for example), it doesn't do anything. IS there a way to have the rewrite rule work for every subfolder inside of the UPLOADS directory?

12-30-2005, 03:41 AM
RewriteRule ^(uploads)/([0-9]+)/([a-zA-Z.0-9]+)$ /download.php?action=1&user=$1&file=$2 [L]