Forum Moderators: phranque

Message Too Old, No Replies

cold fusion dynamic pages

cfm with parameters

         

iainwill

12:50 am on Mar 24, 2004 (gmt 0)



I've got a client site with Cold Fusion pages that are dynamically generated with a parameter to indicate the page number. For example

****.com/index.cfm?nPageId=663

I'm very concerned that search engines will not be able to handle this/ignore this.

There is a possibility that I could get all the pages renamed with a .cfm suffix (eg food.cfm).

Would really appreciate feedback and advice on best approach here.
Thanks
Iain

zhenghua

1:13 am on Mar 24, 2004 (gmt 0)

10+ Year Member



1. Turn to "/index.cfm/nPageId/663"
at index.cfm add following code:

<CFIF isDefined("Form.nPageId")>
<cfset nPageId = Val(Form.nPageId)>
<CFELSEIF isDefined("URL.nPageId")>
<CFSET nPageId = Val(URL.nPageId)>
<!--- Used for search engines --->
<CFELSEIF isDefined("CGI.path_info") AND Compare(CGI.path_info, CGI.Script_Name)>
<CFSET checkPage = Replace(CGI.path_info, CGI.SCRIPT_NAME, "", "all")>
<CFSET nPageId = Right(checkPage, Len(checkPage)-1)>
<CFELSE>
<cfset nPageId=0>
</CFIF>

2. Or, use <cffile> to generate nPageId663.cfm..

Zhenghua