2009-04-13 11 views
1

Fusebox 5.1 noxmlで検索エンジンセーフURLを作成するにはどうすればよいですか?例えばFusebox 5.1 noxmlで検索エンジンセーフURLを作成するにはどうすればよいですか?

、私はこれ欲しい:この代わりに http://www.site.com/index.cfm/app.welcome/

を: http://www.site.com/index.cfm?fuseaction=app.welcome

ヒューズボックス5.1は、これを行うことができると仮定されます。私はこれをarticleと読んだことがありますが、それはxmlバージョンにのみ適用されます。私は少ししか知りません、私はどこから始めるべきかわかりません。どのようにしてnoxmlバージョンのfuseboxでそれを行うのですか?

更新: これをApplication.cfcファイルに追加する必要があるようです。それでもかかわらず、機能していない...

FUSEBOX_PARAMETERS.myself = "index.cfm/fuseaction/"; 
FUSEBOX_PARAMETERS.queryStringStart = "/"; 
FUSEBOX_PARAMETERS.queryStringSeparator = "/"; 
FUSEBOX_PARAMETERS.queryStringEqual = "/"; 

答えて

1

ヒューズボックス5.1あなたは、あなたが変更できるようにすることで、SESのURLを使用することができますか?//。あなたはまだあなた自身のリライターを提供する必要があります。ただし、5.5にアップグレードすることができれば、おそらく書き換えも処理されます。

例リライタ

http://www.fusebox.org/forums/messageview.cfm?catid=31&threadid=6117&STARTPAGE=2

<cfscript> 
// SES converter 
qrystring = ArrayNew(1); 
if (Find("/",cgi.path_info) eq 1 and Find("/#self#",cgi.path_info) eq 0) { 
qrystring = cgi.path_info; 
} else if (Len(Replace(cgi.path_info,"#self#/","")) gt 0) { 
qrystring = ListRest(Replace(cgi.path_info,"#self#/","#self#|"),"|"); 
} else if (FindNoCase("#self#/",cgi.script_name) gt 0) { 
qrystring = ListRest(Replace(cgi.script_name,"#self#/","#self#|"),"|"); 
} 
arQrystring = ListToArray(cgi.path_info,'/'); 
for (q = 1 ; q lte ArrayLen(arQrystring) ; q = q + 2) { 
if (q lte ArrayLen(arQrystring) - 1 and not (arQrystring[ Q ] is myFusebox.getApplication().fuseactionVariable and arQrystring[ q+1] is self)) { 
attributes['#arQrystring[ Q ]#'] = arQrystring[ q+1]; 
} 
} 
</cfscript> 

以下は、Coldcourseを使用することを選択した場合は...

http://coldcourse.riaforge.com

あなたが始めるのに役立つでしょう。 /index.cfm/circuit/action/形式のURLが必要な場合は、サーバー側の書き換え(IISの場合はISAPI)を無視できます。しかし、/ circuit/action /または/ blah /が必要な場合は、サーバー側にする必要があります。メモリに入れて(テストのためか、onRequestStartメソッド)onApplicationStartに入れ

Application.cfcの

。フレームワークロード

<cfset application.coldcourse.dispatch(cgi.path_info, cgi.script_name) /> 

coldcourse.config.cfm(例えば、設定)

<cfset setEnabled(true)> 
<cfset setFrameworkEvent("action")> 
<cfset setFrameworkSeparator(".")> 
<cfset setFrameworkActionDefault("")> 
<cfset setUniqueURLs(true)> 
<cfset setBaseURL("http://www.mysite.com/index.cfm")> 

<!--- CUSTOM COURSES GO HERE (they will be checked in order) ---> 
<!--- for http://www.mysite.com/about/ pages ---> 
<cfset addCourse("components")> 
<cfset addCourse(pattern="about",controller="main",action="about")> 
<cfset addCourse(pattern="contact",controller="main",action="contact")> 
<cfset addCourse(pattern="help",controller="main",action="help")> 

<!--- If nothing else matches, fall back to the standard courses (you probably shouldn't edit these) ---> 
<cfset addCourse(":controller/:action/:id")> 
<cfset addCourse(":controller/:action")> 
<cfset addCourse(":controller")> 

<cfset application.coldcourse = createObject("component","components.util.coldcourse").init("/config/coldcourse.config.cfm")> 

index.cfmに プレイスこのISAPIは

書き換えインストールは

バージョン2.0が3.0と異なるため、正しいrewrite regexを使用していることを確認してください。

2の例。0スクリプト:ファイルがWebサーバー上に存在する場合は、あなたのWebログで404エラーを取得している場合

は、IISのためにこれを

# Coldcourse URL Rewrite for CF 
IterationLimit 0 
RewriteRule ^(/.+/.+/.*\?.+\..*)$ /index.cfm/$1 
RewriteRule ^(/[^.]*)$ /index.cfm/$1 

無効にチェックを行います。

  1. オープンIISマネージャサイト上
  2. 右クリックし、[プロパティ]を選択します
  3. ホームディレクトリ]タブ
  4. をクリックします.CFMをクリックして設定ボタン (ダイアログの右下)
  5. をクリックします拡張子を選択して '編集'
  6. 左下のチェックボックス:「 ファイルが存在することを確認してください」
関連する問題