John,

 

I did this by creating a custom 404 handler in ColdFusion.  You create a
module that looks at the URL and then redirects to where you want it to go
(or just does whatever action you want it to take).  In my case, I did:

 

http://www.mysite.com/whatever

 

and since there was no 'whatever' folder in my web root, the 404 handler was
invoked by IIS.  I had mapped the 404 handler (in IIS settings) to my
'custom404.cfm' module.  In my custom404.cfm module, I had code like this:

 

(pseudo-code):

Check the url, and strip out the last element of the list with the '/'
delimiter and store in sCode variable

<cflocation url=http://www.mysite.com/myspecialpage.cfm?id=#sCode#>

 

Something like that.  If you need more details, let me know.

 

FYI - You can specify a custom 404 handler by each website on your IIS
server, or for all of them, depending on which properties you go into.

 

Let me know if you have any questions.

 

Dave

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Dave Shuck
Sent: Thursday, August 16, 2007 11:19 AM
To: Dallas/Fort Worth ColdFusion User Group Mailing List
Subject: Re: [DFW CFUG] friendly URL

 

Sorry, I missed the IIS part.  You are on your own on that one! :)

On 8/16/07, Dave Shuck <[EMAIL PROTECTED]> wrote: 

.htaccess has nothing to do with rewriting urls that I am aware of.  For
Apache, you can use mod_rewrite which will take your ses url and parse it
according to whatever rules you define.  It works nicely as long as you are
comfortable with the fact that the target non-ses url is written back into
the address bar.  We use a java application called url_rewrite that cloaks
the target url entirely and you can create all sorts of regex patterns to
convert to whatever destination you wish, and it is completely transparent
to the user.  It is really slick and works quite well. 

 

On 8/16/07, Marlon Moyer < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> > wrote:

.htaccess is an Apache thing....

I've not had a lot of good luck with URL rewriting on IIS.  There are
a couple of filters out there that can do it, but it seems most say
they're not for production.

On 8/16/07, John Ivanoff <[EMAIL PROTECTED]> wrote:
> Let's say on my web site I have a employees section. 
> intranet/employees
> which you can search for employees. 
>
> I would like to make a
> intranet/employee/ivanoff
> and return results for the variable ivanoff
>
> I have figured out how to do
> intranet/employee/index.cfm/ivanoff
> and get the results I want 
>
> Is this something I need to do on the webserver? .htaccess file?
> I'm using an IIS server.
>
> so in a nut shell i guess what I need to do is instead of looking for
> a folder (ivanoff) I need to make it a query string. 
>
> Thanks
> John
>
> _______________________________________________
> Reply to DFWCFUG:
>   [email protected]
> Subscribe/Unsubscribe: 
>   http://lists1.safesecureweb.com/mailman/listinfo/list
> List Archives: 
>     http://www.mail-archive.com/list%40list.dfwcfug.org/
>   http://www.mail-archive.com/list%40dfwcfug.org/
<http://www.mail-archive.com/list%40dfwcfug.org/> 
> DFWCFUG Sponsors:
>   www.instantspot.com/
>   www.teksystems.com/
>


--
"Constant over stimu-lation numbs me 
and I wouldn't have
It any other way."

_______________________________________________
Reply to DFWCFUG:
  [email protected]
Subscribe/Unsubscribe: 
   http://lists1.safesecureweb.com/mailman/listinfo/list
<http://lists1.safesecureweb.com/mailman/listinfo/list> 
List Archives:
    http://www.mail-archive.com/list%40list.dfwcfug.org/ 
   http://www.mail-archive.com/list%40dfwcfug.org/
<http://www.mail-archive.com/list%40dfwcfug.org/> 
DFWCFUG Sponsors:
  www.instantspot.com/
   <http://www.teksystems.com/>  www.teksystems.com/





-- 
~Dave Shuck
[EMAIL PROTECTED]
http://daveshuck.instantspot.com 




-- 
~Dave Shuck
[EMAIL PROTECTED]
http://daveshuck.instantspot.com 

_______________________________________________
Reply to DFWCFUG: 
  [email protected]
Subscribe/Unsubscribe: 
  http://lists1.safesecureweb.com/mailman/listinfo/list
List Archives: 
    http://www.mail-archive.com/list%40list.dfwcfug.org/             
  http://www.mail-archive.com/list%40dfwcfug.org/
DFWCFUG Sponsors: 
  www.instantspot.com/
  www.teksystems.com/

Reply via email to