Avatar of Polishka-Renicon
Polishka-Renicon
 asked on

Is there a way to create a sort of "Pseudo Directory" using ColdFusion or IIS?

Does anyone know of a way to create a kind of "Pseudo Directory"  (fake directory) so the browser believes it exists  and not toss an error?

I'm new to programming and the reason I want this is to create a more friendly URL using forward slashes instead of  hyphens to separate content and ideas for the area we wish to send the user.

We're using ColdFusion 11 Enterprise on Windows Server 2012 R2, IIS 8.5, and SQL2008.

URL ReWrite does not work correctly for me to do this (that is a currently open question of mine on the subject).

I could use Active ColdFusion Mappings but that would require a bit  too many to manage and there could be duplicates that may lead to errors. This needs to be simple. I can hardcode them into the URL by creating the directories on the fly but hoped this could be simpler with some function I don't know about.

https://www.experts-exchange.com/questions/28894359/URL-ReWrite-Friendly-URL-not-working-for-novice-programmer.html

I can use CFDirectory to create the directory okay, and use IIS to control the default document but that means creating lots of empty directories. That's not a big problem but if it's not necessary why bother?

I understand it is the client side that sees and executes the result of the browser but was wondering if there's some ColdFusion function, tag, etc, I've missed that might possibly do what I want?

EXAMPLE:
www.doman.com/files/#YEAR#/#DATE#/#category#/#numberid#/view.htm

I can create variables for the above and insert them but did not want to bother with forcing me to create the directories.
ColdFusion LanguageMicrosoft IIS Web ServerWindows Server 2012

Avatar of undefined
Last Comment
giltjr

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
giltjr

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Polishka-Renicon

ASKER
Thanks giltjr for taking your time to answer. I really do appreciate it.

Yes, I'm familiar with the acronym URL, very basic stuff. But then you don't know how much I know, but I can't help pointing out that the difference between understanding the meaning of URL and how to get URL ReWrite to change ?id= into something else, as advertised, are worlds apart.

If, as you suggest, there is no way to change the URL from '?id=' (if that is what you are saying) into a word or into a variable, then why is it called URL ReWrite and why does the program very clearly state that this simple string can be changed? It makes no sense to me and no one has been able to state it in any way at all. I cannot continue to return here only to find nothing helpful. Yours has been the best so don't feel I'm picking on you. I do appreciate it.

I  don't want to change /event/?id=23" into "event/YYYY-MM-DD/CategoryName/". The date format was just an idea. I want to change it into a name of my choice or simply use one of the suggestions given by URL ReWrite. That is the point and frankly, I cannot understand why this is so difficult.

Also, I don't really expect URL ReWrite to use the actual ID, or the Uniqueidentifier. I can supply that from the cfquery easily enough.

 So, your concern about:
>you would need a id number for every possible YYYY-MM-DD/CategoryName possibility.
is understandable but I don't think important when I would use a variable.

> you need a program/script that gets invoked
Sounds great but so easy to state. I have no idea what it means. Yes, I know what a script is but there have been no specific suggestions I can see, or no effort to point out exactly how it would work and no examples. Without that, it means nothing to a novice.

>Which means the folder has to exist if all you are doing is a URL rewrite.
Yes, I know that now and thanks for pointing it out. I don't require a forward slash so a hyphen would work nearly as well, avoiding the folder problem. But that does not solve the initial need to change '?id='.

Thanks for taking time to try to explain this as best as you can. It does not address the question about a Pseudo Directory, but I think I've had enough time spent and wasted on EE. I have no plan to return so it would be best for me to just give you the points and close this. Bye.
giltjr

Thanks for the points.  Hopefully you will read this,

The simple solution to your basic problem/question of

--> But that does not solve the initial need to change '?id='.

You need to write a program.  URL re-write will NOT do it.  I don't think you know/understand as much you think you do, otherwise you would understand why URL re-write does not work.

Good luck in getting what you want accomplished.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy