Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

A file as a directory

I want to provide my users with an easy URL that connects them to a specific file.

What I've got in mind would be something like "http://www.myserver.com/their_id_number."

So, if the URL, using the format I'm envisioning, looked like this: http://www.brucegust.com/12345 then it would direct the user to the appropriate page where I'm grabbing the id number and doing the necessary coding to provide them with the info I want to communicate.

I've got over 60,000 ids, so that number of folders isn't practical, but it seems I've seen what I'm trying to do. My question is: How? How do you set up your server in such a way where you have the capacity to do what I'm attempting?

Thoughts?
Avatar of strivoli
strivoli
Flag of Italy image

I would create a 2 level tree:
a. 1st level with 600 folders,
b. 2nd level with 100 folders,

The total will be 600*100=60,000 ids.
SOLUTION
Avatar of gr8gonzo
gr8gonzo
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bruce Gust

ASKER

What I'll do is use a hex key to prevent ids from being exposed, but now, here's my question:

I'll turn on the Rewrite Engine, but then how do I configure it so it only kicks on when there's an id? My concern is that the way I have it in my head right now, any valid address after the slash is going to be processed as a rewrite and I don't want that.

So...

brucegust.com/qr/index.php?id=12345 needs to be...
brucegust.com/12345

RewriteEngine On
RewriteRule /

How do I structure my RewriteRule?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial