Making even nicer url to file download page?

All support enquiries for DFH go in here...

Making even nicer url to file download page?

Postby test » Sun Nov 13, 2011 4:45 pm

Well, .htaccess is making my urls look like: http://www.domain.com/123.filename - and that's ok.
BUT, what if I want to make http://www.domain.com/123 - to point to http://www.domain.com/123.filename? What should I write in the .htaccess file?

I want that http://www.domain.com/567 will point to http://www.domain.com/567.filename, or to download.php?file=567.filename (I prefer the second one ;))

Thanks for your help, and for this awesome script. :)
test
Standard Member
 
Posts: 37
Joined: Tue Apr 05, 2011 1:21 pm

Re: Making even nicer url to file download page?

Postby SamEA » Mon Nov 14, 2011 6:11 am

How would .htaccess know where filename 567 is? Also, what if you had two files under the name 567? E.g. 567Filename1.jpg or 567Filename2.rar

Alternatively, you can change the way files are stored e.g. instead of 383Filename.rar, it will be 98291292?
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: Making even nicer url to file download page?

Postby test » Mon Nov 14, 2011 10:13 am

Oh, I thought each file has a unique number... So never mind. :)
Unless, you can alter the code - to make every uploaded file check all of the IDs (unique file numbers) - and use a different (available) ID.
I know that the range is from 0 to 999 now, maybe that can be changed to 9999, or 99999 - basically - from 0 to a number so that people can upload unlimited amount files to a server, and there will be no collision with the IDs.

What do you think?
test
Standard Member
 
Posts: 37
Joined: Tue Apr 05, 2011 1:21 pm

Re: Making even nicer url to file download page?

Postby SamEA » Wed Nov 16, 2011 7:07 am

Possible and I will try to MOD this one up for you soon, but not very soon due to the current workload I have. This MOD will also be beneficial for filenames with Arabic/Chinese/Russian or other languages containing symbols are uploaded.
SamEA,
DaddyScripts' Admin & Developer.

Require a PHP or general IT freelancer? Don't hesitate to PM me.
User avatar
SamEA
Site Admin
 
Posts: 1165
Joined: Sat Feb 19, 2011 7:51 pm

Re: Making even nicer url to file download page?

Postby test » Wed Nov 16, 2011 10:55 am

Thanks alot! I appreciate it! :)
test
Standard Member
 
Posts: 37
Joined: Tue Apr 05, 2011 1:21 pm


Return to Daddy's File Host v1.X

Who is online

Users browsing this forum: No registered users and 15 guests

cron