|
<cfscript>
debug = 0;
valid_extensions =
"html,htm,cfm,asp,jsp";
url_suffix =".html";
path_to_parse = replacenocase(cgi.path_info,
cgi.script_name, "");
if(listlen(path_to_parse,"/")gte 2)
{
var_name = "";
for(x = 1;x lte listlen(path_to_parse, "/");x =
x + 1) {
if(var_name eq "") {
var_name = trim(listgetat(path_to_parse,
x, "/"));
if(not
refind("^[A-Za-z][A-Za-z0-9_]*$",var_name)) {
var_name="";
x = x + 1;
}
}
else {
value_to_set = listgetat(path_to_parse, x,
"/";
if(trim(valid_extensions) neq "" and x eq
listlen(path_to_parse, "/")) {
for(ext = 1; ext lte
listlen(valid_extensions);ext = ext + 1) {
extension = "." &
listgetat(valid_extensions, ext);
If(right(value_to_set, len(extension)) eq
extension) {
value_to_set = left(value_to_set,
len(value_to_set) - len(extension));
url_suffix =
extension;
break;
}
}
}
setvariable(var_name,
value_to_set);
if (isdefined("debug") and debug)
{
writeoutput("<!--" & var_name &
" = " & value_to_set & " -->" & chr(10));
}
var_name="";
}
}
}
</cfscript>
I can't guarantee that this will work correctly. If
you get an error, try striping the white spaces out at the beginning of the
lines.
George Quade
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adaryl "Bob" Wakefield Sent: Friday, June 04, 2004 8:49 AM To: [EMAIL PROTECTED] Subject: [KCFusion] directory thing I have no idea how to google for this. Anybody know
how to make your urls look like
insted of www.foo.com?id=123
|
- [KCFusion] directory thing Adaryl \"Bob\" Wakefield
- RE: [KCFusion] directory thing Nate Rightmire
- Re: [KCFusion] directory thing Adaryl \"Bob\" Wakefield
- RE: [KCFusion] directory thing Jones Matt
- RE: [KCFusion] directory thing Jones Matt
- RE: [KCFusion] directory thing George Quade
- RE: [KCFusion] directory thing Conner, Denise M [CC]
- Re: [KCFusion] directory thing Adaryl \"Bob\" Wakefield
- RE: [KCFusion] directory t... Nate Rightmire
- Re: [KCFusion] directory thing Brian Fitzgerald
- Re: [KCFusion] directory t... Brian Fitzgerald
- RE: [KCFusion] directory thing Ellis, Randy
