| PHP, MySQL General PHP questions. Or go to our PHPsuexec Forum >> |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread |
|
|
#1 (permalink) |
|
Registered User
Seasoned Poster
Joined in Sep 2004
43 posts
Gave thanks: 0
Thanked 0 times
|
Downloads Links
I was wondering what do i have to do to convert normal html links like:
http://www.mydomain.com/folder/folder2/file.ext to say something like this: http://www.mydomain.com/download.php?get=file109445 Can anyone help me please? Thank you
__________________
|
|
|
|
|
|
#2 (permalink) |
|
Caffeine fiend
Comfy Contributor
Joined in Aug 2004
Lives in Reston, Virginia
Hosted on pass15
270 posts
Gave thanks: 0
Thanked 0 times
|
Four options I see:
1. Fake it with a php SWITCH statement as explained elsewhere in the "hide PHP" thread. 2. Write a little bit more php so the actual filenames are stored in a MySQL database, that way you can add more of these files without messing with the programming. 3. Find an open source module that already does #2. Almost every CMS known to man has that feature, so in theory you can install the CMS in a folder, turn everything off except for the downloads module and use the admin part of it to manage the links to the files. Then you can use the URLS generated by it anywhere else in your site. I bet it takes less work to do this than to do either #1 or #2. 4. Use mod_rewrite rules to redirect each request to its intended location. |
|
|
|
|
|
#4 (permalink) |
|
Caffeine fiend
Comfy Contributor
Joined in Aug 2004
Lives in Reston, Virginia
Hosted on pass15
270 posts
Gave thanks: 0
Thanked 0 times
|
Early weekend crowd, aren't we all?
Funny thing is I started assuming I had three answers, and halfway I realized I could use mod_rewrite too. I tell you, there is a mod_rewrite conspiracy out there. /waits for the black helicopters |
|
|
|