Using part of file name in a query

I am putting together a member directory and I want to be
sure that it is best optimized for the search engines (SEO). For
this reason, I want to appear to have a unique file for each
member. I know that I could just link to a master file and pass the
member ID like:
www.example.com/memberdir/member.cfm?memberid=12345, but that isn't
the best solution.
To be better optimized I would like to use the following
format
www.example.com/memberdir/12345.cfm
The trouble that I am running into is that the files
(12345.cfm, 12346.cfm, etc.) don't exist and return 404's. The only
directory on our site that will handle things in this way is the
'memberdir' folder. I am trying to handle this without making an
modifications to IIS or using ISAPI Rewrite.
I am using the application.cfm file to handle the processing
(the query that pulls the member data). However, I haven't been
able to get around the issue with the file not existing. Again, I
don't want to have to make changes with IIS and I don't think it
will be the most efficient to check for the existance of the file
and writing a shell file (an empty .cfm file for all members) to
avoid the 404. I could do that, but it doesn't seem like the ideal
solution.
If anyone has any guidance to point me in the right
direction, it would be much appreciated.
Thanks,
roblaw

There was a suggestion made to me, that I used, previously on
this board. It works really well. Have a page which checks for the
existence of the necessary perameters in the url, and parses
accordingly. If the necesary parameters aren't located in the url,
then return a 'personalized' 404 error.
However, the long and the short of it is that you will have
to redirect all 404 errors from the server to hit this special .cfm
page. (you will have to edit the IIS.)
If you want to see this in action, go to
www.jxp.com/whatever, since the call would be a '404' error, it
calls the special 404 page that I created, which checks the dB for
the 'whatever' if 'whatever' exists then it shows the necessary
page, otherwise I return a listing of other possible 'hits' you may
have been looking for. This will give you an idea of what you can
do.
Hope this helps.

Similar Messages

  • Comparing files in two folders to find duplicates using part of file name

    I'm not sure if this is something Automator or perhaps Terminal can do, hoping someone might be able to offer guidance or suggestions.
    I have two folders filled with files of photographs.
    First folder has approx 15,000 files.
    Second folder has approx 1,200 files.
    I need to compare the files in the two folders and remove duplicates from the First folder. In other words, the 1,200 files in the Second folder are also in the First folder and they need to be removed from the First folder, leaving 15,000 - 1,200 = 13,800 files in the First folder.
    To add a wrinkle to the comparison (nothing is ever that easy), the file names are consistent between folders for the first 17 characters (files follow the format of my name_6 digit date_4 digit # sequence, ie nickB0904087110.jpg) but in the Second folder, the files will have an additional tag added to the file name (ie nickB090408_7110Final.jpg).
    Any suggestions or help much appreciated!
    nick

    Old post, sorry, but for the sake of trying to answer it:
    The method described here can accomplish the goal, as I understand it.
    http://texo.wordpress.com/2009/08/17/comparing-large-directories-fast-in-osx-or- linux/
    rsync -rvn --delete /FirstDirectory /SecondDirectory
    (He describes: The 'n' flag is a 'dry-run'; remove it and the files will be copied. And '--delete' deletes any files NOT in the FirstDirectory.)
    I found I needed to put slashes at the end of the directory name too. ... /Directory1/ /Directory2/
    That way it seems to compare those actual folders. Without the slashes, it just put a copy of Directory1 into Directory2. I'm sure there's something I don't understand about rsync though.

  • Query string read as part of file name, throwing not found errors

    Hi all, I host a number of Web sites under a CF7 installation, Win2003.
    One site in particular is throwing not-found errors in response to certain search bot requests.
    In the IIS log, I noticed that for these requests, the query part of the URL is part of cs-uri-stem field value, but is not in the cs-uri-query field where it belongs:
    cs-uri-stem=                                               /index.cfm?template=24hour5.cfm
    cs-uri-query=<blank>
    instead of
    cs-uri-stem=                                               /index.cfm
    cs-uri-query=template=24hour5.cfm
    Evidently something somewhere is interpreting the entire URL as a filename, instead of a file name and a query string. When CF tries to locate the file it is throwing a not-found error.
    Maybe there is something weird about the question mark, but it looks normal to me.
    I can't seem to stop this error, since it is occuring at the OS, IIS, CF or jrun layer. Does anyone have any idea what is going on here, and what I can do about it?
    Thanks in advance.
    Joe

    Hey Reed, thanks for responding.
    I have a Cf utility that parses logs, so I modifed it to print out the ASCII codes for each character. They look normal, as far as I can tell. The question mark has a code of 63 which is correct, and no non-alphabetic characters precede or follow.
    One interesting thing is that the stem being called is an index.cfm file, and the query string argument happens to be a template name, and it ends in .cfm. That's why it is making it all the way to CF, which chokes on it, instead of IIS logging a 404 error.
    Often an identifiable bot is requesting these bad URLs, though I have spotted another request with agent 'Mozilla/4.0.' I suspect that is some kind of automated scan. (I also see other requests with the same agent name, though a different IP, that look like errononeously URL-encoded requests. These get filtered by URLScan.)
    I don't know for sure is whether the specific clients that make these bad calls always make them them wrong way. They appear to. Most clients that access the site do so normally.
    I wonder if there could be something in the request header, perhaps that instructs IIS to expect a different charset than what is actually used, or something like that.

  • Unable to generate csr, Please use a valid file name

    I've been attempting to generate a new certificate signing request on our Exchange 2013 server.  In the past we've never had a problem but we seem to be stuck today.  When we try to output the new csr to one of our network shares we see the following
    error.  
    "Please use a valid file name when you run the New-ExchangeCertificate cmdlet on server server1 with the -RequestFile parameter. The file should not exist in target folder. Parameter name: RequestFile"
    We've use this share location before without problems, the Exchange Trusted Subsystem has write intermissions on this location as described online but we still receive the error.  I've tried creating new locations but haven't had any success.
    Any suggestions?
    Thanks

    Hi,
    We can access the Exchange Certificate Management UI through the EAC in Exchange 2013 by selecting
    Servers and then Certificates to create a new certificate to have a try.
    Alternatively, we can try the following command:
    $Data = New-ExchangeCertificate -GenerateRequest -SubjectName "c=US, o=contoso inc, cn=server.contoso.com" -DomainName mail.contoso.com, contoso.com, autodiscover.contoso.com -PrivateKeyExportable $true
    Set-Content -path "C:\Certificates\MyCertRequest.req" -Value $Data
    Regards,
    Winnie Liang
    TechNet Community Support

  • I used part of my name in my home network.  Now I understand this was stupid security error.  How can i change the name of my home wifi network, airport express?  Thanks.

    I used part of my name in my home network.  Now I understand this was stupid security error.  How can i change the name of my home wifi network, airport express?  Thanks.

    Open Macintosh HD > Applications > Utilities > AirPort Utility
    Click on the picture of the AirPort Express
    Click Edit in the smaller window that appears
    Click the Wireless tab at the top of the next window
    Edit the Wireless Network Name
    Keep it short.....maximum 10-12 characters or so. No blank spaces or punctuation marks in the name
    Click Update at the lower right of the window to save the new setting and wait a full minute for the AirPort to restart

  • Is there a way to relink to folder and only use a selected part of file name

    I would like to be able to choose to use just the first 3 places of the file name to relink my graghics files. ie:  001, 002, 003 and have it ignore the rest of the file name, we can now change the extender, could this feature be expanded to enclude more options.  Or is there a plugin that will aready do this?

    Did you transfer the telephone number from the old phone to the new phone?  If you did, I don't see how you could still have cellular service, even if you turned it off in settings.

  • Bursting with username as part of file name

    I'd like to do something like this, using :xdo_user_name as part of a bursted file name:
    bursting code:
    select distinct
    Geography.Region KEY,
    'Blue' TEMPLATE,
    'RTF' TEMPLATE_FORMAT,
    'en-US' LOCALE,
    'PDF' OUTPUT_FORMAT,
    'FILE' DEL_CHANNEL,
    'C:\Bursting' PARAMETER1,
    Geography.Region || :xdo_user_name || '.pdf' PARAMETER2
    from Retro.Locales Geography
    This works perfectly fine if I omit the || :xdo_user_name from the column definition of parameter2. It fails with this error when I include it:
    oracle.apps.xdo.servlet.scheduler.ProcessingException: oracle.apps.xdo.XDOException: java.io.IOException: prepare query failed
    [nQSError: 42032] Parameters are not supported in the select list.
         at oracle.apps.xdo.servlet.scheduler.XDOJob.runBurstingReport(XDOJob.java:2116)
         at oracle.apps.xdo.servlet.scheduler.XDOJob.execute(XDOJob.java:358)
         at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
         at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
    Is the inclusion of a user name possible possible in the bursting code?

    Hey Reed, thanks for responding.
    I have a Cf utility that parses logs, so I modifed it to print out the ASCII codes for each character. They look normal, as far as I can tell. The question mark has a code of 63 which is correct, and no non-alphabetic characters precede or follow.
    One interesting thing is that the stem being called is an index.cfm file, and the query string argument happens to be a template name, and it ends in .cfm. That's why it is making it all the way to CF, which chokes on it, instead of IIS logging a 404 error.
    Often an identifiable bot is requesting these bad URLs, though I have spotted another request with agent 'Mozilla/4.0.' I suspect that is some kind of automated scan. (I also see other requests with the same agent name, though a different IP, that look like errononeously URL-encoded requests. These get filtered by URLScan.)
    I don't know for sure is whether the specific clients that make these bad calls always make them them wrong way. They appear to. Most clients that access the site do so normally.
    I wonder if there could be something in the request header, perhaps that instructs IIS to expect a different charset than what is actually used, or something like that.

  • Date part in file name of backup file

    Hi,
    i want the datepart to be included in the file name of dump file which is a backup file of a schema. what i need is i want to know the approriate dos command which can be used in export utility , such that the file name should contain date part
    when i tried to do this by running the script
    EXP system/[email protected] file="c:\toniknvtest_%date%.dmp" owner=toniknvtest
    the dump is created with filename toniknvtest_wed where as i want "toniknvtest_wed_8_2_2006."
    pls correct the date part in the export command
    Thank you,
    Raj Deep.A

    Any Idea?! :-)
    D:\oracle\ora92\bin>cmd
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    D:\oracle\ora92\bin>set
    ALLUSERSPROFILE=C:\Documents and Settings\All Users
    APPDATA=C:\Documents and Settings\owner\Application Data
    CLIENTNAME=Console
    CommonProgramFiles=C:\Program Files\Common Files
    COMPUTERNAME=REZA
    ComSpec=C:\WINDOWS\system32\cmd.exe
    FP_NO_HOST_CHECK=NO
    HOMEDRIVE=C:
    HOMEPATH=\Documents and Settings\owner
    LOGONSERVER=\\REZA
    NUMBER_OF_PROCESSORS=1
    OS=Windows_NT
    Path=D:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program F
    Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbe
    Program Files\Symantec\pcAnywhere\
    PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    PROCESSOR_ARCHITECTURE=x86
    PROCESSOR_IDENTIFIER=x86 Family 6 Model 13 Stepping 6, GenuineIntel
    PROCESSOR_LEVEL=6
    PROCESSOR_REVISION=0d06
    ProgramFiles=C:\Program Files
    PROMPT=$P$G
    SESSIONNAME=Console
    SystemDrive=C:
    SystemRoot=C:\WINDOWS
    TEMP=C:\DOCUME~1\owner\LOCALS~1\Temp
    TMP=C:\DOCUME~1\owner\LOCALS~1\Temp
    USERDOMAIN=REZA
    USERNAME=owner
    USERPROFILE=C:\Documents and Settings\owner
    WF_RESOURCES=D:\oracle\ora92\WF\RES\WFus.RES
    windir=C:\WINDOWS
    D:\oracle\ora92\bin>echo %date%
    Wed 02/08/2006
    D:\oracle\ora92\bin>Regards,
    Reza

  • Adobe  8.x Pro Removing Part of File Name

    As SOP, I name files by what they are preceded by the date. For example, a letter from John today would be "2008 0519 Ltr from John". When combining files, Adobe is dropping the numbers and booking the file as "Ltr from John". Of course, that is messing up the chronological order of my files. Is there a way to grab the entire file name?
    Many thanks.

    Spaces and other non-standard characters in file names is one of the results of the long file names that MS introduced. The names can be useful at times, but special characters and spaces should be avoided. As Geo indicated, spaces are commonly represented by an underscore. It is interesting that many web sites have also fallen prey to the MS names with spaces. Other browsers (not IE) try to replace such spaces with %20 for use. MS tends to ignore industry standards and causes a lot of problems as a result.
    This is all likely part of your problem. Good luck in resolving it. Geo's advice it probably about as sound as you will get.

  • Is it possible to extract a PDF file into separate ones but using a specific file name that comes from the PDF page?

    Hello,
    I am unsure if this is possible but its worth asking.
    I have a PDF document that contains 56 pages.
    Each page has an 'Agreement Number' at the top left.
    I have managed to successfully extract the pages into separate documents (56 documents) but they are all named the same but page 1, page 2, page 3 etc..
    What i am trying to do is use these 'agreement numbers' in the extraction process so when they save i have 56 different files but they show the agreement number in the file name.
    i have looked into changing the actual page numbers on the page thumbnails to see if you can do it that was to no avail.
    any help would be much appreciated, or tell me i cant do it, at least i know ill be defeated.
    PS i have around 6 or 7 PDF files with 50+ pages so its a long boring task if i need to go and rename all these.
    Cheers
    Jez

    It would be possible in theory to do it with a folder-level script, provided the string you need is in exactly the same structural position on each page. You would use the doc.getPageNthWord() function to collect the string you want, then the doc.extractPages() function to save each page to a file.
    See the Acrobat SDK documentation for help with scripting. http://bit.ly/AXISDKH

  • How can I prevent Firefox from cutting off the title of a webpage for use as a file name when printing/saving as PDF if there's a / in it?

    Like it says in the question - when I try to print/save a webpage as a PDF, Firefox (version 36.0, Windows 8.1 64bit, German) usually uses the page's title as the file name. Slashes are, of course, not allowed in file names, but instead of just leaving leaving it out or replacing it with a hyphen, the title is cut off and everything before the last slash is gone, which in some cases results in very odd and misleading file names.
    Is this a known bug? I couldn't find anything. So I'm just wondering if there's either going to be a fix anytime soon, or whether there is a simpler solution than to generate a different title sans slashes specifically for Firefox users.
    Thanks in advance for Your help!

    There is more than one proxy type.<br />
    Only an anonymous proxy will hide the IP and build two connections, one between you and the proxy and a second connection between the proxy and the website that uses an IP from that proxy.<br />
    A normal proxy merely passes all traffic without affecting it, so websites see your IP in such a case.
    *http://en.wikipedia.org/wiki/Proxy_server

  • Thousands of individual .txt files being created while using "next available file name" option in Save to ASCII step

    I'm using Signal Express to record Load vs Displacement data and export it to a format our engineers can work with (in this case ASCII is okay). It would seem that by selecting the Next Available File Name from the drop down arrow it would do just that. For instance a typical save path for me would look like C:\....Desktop\Project Number and Description\Run_1.txt within that Run1.txt file would be all the data points for that run. When I hit record again Signal Express would (SHOULD) create a Run_2 since it's the Next Available File Name.
    But instead what it does is creates a single txt file for every single sample point being read. Needless to say, If I'm recording 6 second of data at 1khz I end up with thousands of txt files!
    The first thing that comes to mind is, why would anyone want this?
    Second is how can I record multiple individal runs for the same project and have the file name increment?
    SCXI- 1000 Chassis w/ 1346 adapter
    PCI 6281 DAQ card
    SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
    SCXI- 1180 Feedthrough Panel w/ 1302 Block
    Signal Express 2014.
    Win7 Enterprise

    ...and more attachments of the ASCII save path, before and after acquiring 4 seconds of data along with one of the files from that folder.
    Again, this is 4 seconds of two-channel spring  plot data at 100 Samples to Read @ 1k Rate (Start Run.... wait 4 seconds or two full test sample cycles... Stop Run).
    ~EDIT~
    The .txt file would not attach (I think it's too small). Here's what it looks like if you were to open it:
    Load vs Displ - Displ (inches)    Load vs Displ - Load (lbs)
    3.736323                              273.751906
    Also, for some reason it won't let me attach my project file. It's a .seproj extension but the forum thinks it's 1k in size and "empty"
    Message Edited by OKors on 06-05-2009 05:57 PM
    SCXI- 1000 Chassis w/ 1346 adapter
    PCI 6281 DAQ card
    SCXI- 1520 Bridge Board w/ 1314 Terminal Block (x2)
    SCXI- 1180 Feedthrough Panel w/ 1302 Block
    Signal Express 2014.
    Win7 Enterprise
    Attachments:
    FolderBeforeSave.JPG ‏39 KB
    FolderAfterSave.JPG ‏239 KB

  • Run Applet On Server Using 8.3 File Name Format

    Hello Everyone,
    I am currently trying to produce an applet that will display content from a PLC (which hosts its own webpage).The PLC itself only allows files using the 8.3 file name format to be stored on it (eg. 123456789.123).
    I have tried a few simple things, such as changing the ".class" file extension to ".cls". But this just produced an error in my internet browser (IE 8).
    Any help and/or work-arounds would be greatly appreciated.
    Thank you,
    Vincent Wiebe

    849427 wrote:
    ..I did not think of that, ..That's why forums rock. Many minds are better than one. ;)
    Thank you very much :)You're welcome. :-)

  • Accidental use of "/" in file names

    I accidentally used a "/" in a filename (I know it's invalid), but came up with some interesting results. The file was on a USB attached drive. On the Mac that had the attached drive I could see the filename. I have two MacBooks that are network attached via wi-fi to the drive via a share on the attached Mac, and on one of them I could see the filename, and on the other I couldn't. Once I dropped the "/" it became visible to the one that couldn't see it.
    Anyone have any suggestions why one MacBook could see it  and the other couldn't?

    wa1oui wrote:
    I was just hoping someone else might have run into this before and could immediately reply with the answer they had found.
    As for this being of academic interest, this IS a discussion group.
    Well if you want to discuss, that can be done...
    A long time ago, in an operating system far, far away (namely MacOS) there were no such things as paths, let along delimiters. People had too much trouble dealing with that, so they used ':' as a path delimiter. Anything else was allowed.
    Fast forward to the future and we are using a UNIX system called MacOSX. The only character not allowed is the UNIX filesystem delimiter '/'. However, the Finder, and lots of other legacy programs still allowed '/' in file names and didn't allow ':'. In such programs, there is sometimes some path delimiter magic twiddling going on. In the Finder, you can create a file name with a '/'. If you then run Terminal.app and do a UNIX directory listing, you will see your file with a ':' where the '/' should be. The same thing works in reverse. If you use various modern and/or UNIX tools create a file with a colon in the name, it will show up in the Finder as a '/'. This "feature" is strictly for backwards compatibility. You should consider both characters to be forbidden.
    Plus, if you ever want to share your files with Windows users, you should consider all the assorted Windows special characters to be forbidden too. Depending on what software you use here or there, it may or may not work. There is no real definitive list as software is being modified and upgraded all the time.
    There is nothing wrong with having spaces in file or folder names either. However, some lazy UNIX programmers forget this and things may fail, perhaps spectacularly, if you make heavy use of open-source programs.

  • Copy the latest file (only a part of file name and extension is known) from source to destination (VB)

    Hi,
    I need to copy a file (latest) that is present in Temp folder to AppData/Roaming folder. But I know that the file name starts with "MSI" and the file extension is ".log" (like MSI*.log where * is a random hexadecimal number). Also, I need
    to get the path for Temp and AppData/Roaming programmatically. After copying to the destination, I need to rename the file as well. I am very new to VB Script. How can I do this? Can you please give me some examples?
    Thanks in advance.
    Thanks
    Prasad

    Can you post your script?  What have you done so far.
    I recommend a little research in how to use default folders although they will help onl;y the logged in user.
    Why do you thing you need to do this:  You can always tell the installer to place the log file in a place other than temp.
    ¯\_(ツ)_/¯

Maybe you are looking for