Solved

Search Engine Friendly URL probem

Posted on 2003-11-12
9
691 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
  • 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
 
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
Free camera licenses with purchase of My Cloud NAS

Milestone Arcus software is compatible with thousands of industry-leading cameras for added flexibility. Upon installation on your My Cloud NAS, you will receive two (2) camera licenses already enabled in the software. And for a limited time, get additional camera licenses FREE.

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

Save on storage to protect fatherhood memories

You're the dad who has everything. This Father's Day, make sure your family memories are protected. My Passport Ultra has automatic backup and password protection to keep your cherished photos and videos safe. With up to 3TB, you have plenty of room to hold the adventures ahead.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to secure a website behind a firewall that only allows VPN access 3 52
Google Crawl Errors Producing 404 Errors 4 80
Website URL redirection 10 62
System Analysis 5 51
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

910 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now