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.
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/Category
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.