?
Solved

Search Engine Friendly URL probem

Posted on 2003-11-12
9
Medium Priority
?
726 Views
Last Modified: 2013-12-24
An earlier discussion ( http://www.experts-exchange.com/Web/WebDevSoftware/ColdFusion/Q_20791920.html ) has an answer as to how to subsitute
myurl.cfmparam1=pval1&param2=pval2so that
myurl.cfm/param1/pval2/param2/pval2
is the URL

I implemented the solution BUT there appears to be a problem when the browser is Mozilla or IE5.x - and possibly others. It works OK with IE6 and NS6

The calling page contains something like this
<a href="mb3/viewmessagesns.cfm/Forum/#Getposts.ForumID#/Topic/#Getposts.TopicID#/sortby/#checkmember.sortby#>linkname</a>
and the called page uses the following to decipher the URL

<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>

Any help appreciated!






0
Comment
Question by:kjuliff
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 2
  • 2
9 Comments
 
LVL 19

Expert Comment

by:cheekycj
ID: 9732179
Instead of "/" - definitely not a good idea.. use the words AND and EQ

myurl.cfm?param1=pval1&param2=pval2

becomes

myurl.cfm?param1EQpval1ANDparam2EQpval2

CJ
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 9732187
Oops instead of AND use AMP

myurl.cfm?param1EQpval1AMPparam2EQpval2

CJ
0
 
LVL 1

Author Comment

by:kjuliff
ID: 9732381
I don't think you understand. I want the search engine friendy url with the / instead of the ?

Why would what I have done NOT work in IE5?
0
Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

 
LVL 19

Expert Comment

by:cheekycj
ID: 9732410
My company just redid all their links to make them search engine friendly and we still use the ? but replaced the & with AMP and = with EQ

What makes you think that the ? will throw off search engines.

CJ
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 9732500
Are you using IIS or Apache redirects?
http://www.devarticles.com/art/1/506
http://www.smalig.com/url_rewrite-en.htm

A good article I just read that explains this:
http://www.seoconsultants.com/articles/1000/url-rewriting.asp

Can you post your site url so I can test it?

CJ
0
 
LVL 19

Expert Comment

by:cheekycj
ID: 9732545
Did you setup the CF Server to replace the "?" with "/"

CJ
0
 
LVL 1

Author Comment

by:kjuliff
ID: 9732844
I think  that the ? throws off the SEs as I've read that it does. In the article you suggested (http://www.seoconsultants.com/articles/1000/url-rewriting.asp) - very good article - thank you! - it also states this.

I don't have a public site so can't give you the URl. Actually I can't reproduce the problem myself but am told by some visitors...
0
 
LVL 17

Accepted Solution

by:
anandkp earned 2000 total points
ID: 9737248
Hi,

u cld use sesConverter for ur kinda requirement !
http://www.fusium.com/index.cfm?fuseaction=home.buildmaster&bodyFuseaction=ses.intro

for having "/" in ur URL's ... just take a look at it & see if it meets ur requirement !

K'Rgds
Anand
0
 
LVL 17

Expert Comment

by:anandkp
ID: 9745209
:)

Cheers
Anand
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses
Course of the Month14 days, 15 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question