【发布时间】:2012-03-13 12:43:26
【问题描述】:
我的问题是我无法让 RewriteRule 工作。我有一个嵌入了 Flash 对象的 PHP 页面。我想要的是写一个规则来实现这一点:
http://mydomain.com/ 应该指向这个:
http://mydomain.com/AdServer.php
Flash 对象的所有参数(在查询字符串中,如果可用)也应该由 RewriteRule “复制”:
http://mydomain.com/?sessionId="dfdsfsdfsd"#code=d83285e9352d69b3a694fa4c9543db83
应该这样改写:
http://mydomain.com/AdServer.php?sessionId="dfdsfsdfsd"#code=d83285e9352d69b3a694fa4c9543db83
我在我的 .htaccess 文件中写了这个:
RewriteEngine on
RewriteRule ^(.*)$ AdServer.php
现在,最大的问题是,flash 对象根本没有加载。
谁能帮帮我?
非常感谢您。
大卫
这是我用来在页面中嵌入 Flash 对象的代码:
// Version check based upon the values defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if ( hasProductInstall && !hasRequestedVersion ) {
// DO NOT MODIFY THE FOLLOWING FOUR LINES
// Location visited after installation is complete if installation is required
var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
var MMredirectURL = window.location;
document.title = document.title.slice(0, 47) + " - Flash Player Installation";
var MMdoctitle = document.title;
AC_FL_RunContent(
"src", "playerProductInstall",
"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
"width", "<?=WIDTH ?>",
"height", "<?=HEIGHT ?>",
"align", "middle",
"id", "AdServer",
"quality", "high",
"bgcolor", "#555555",
"name", "AdServer",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
} else if (hasRequestedVersion) {
// if we've detected an acceptable version
// embed the Flash Content SWF when all tests are passed
AC_FL_RunContent(
"src", "AdServer",
"width", "<?=WIDTH ?>",
"flashVars", "str=<?=$dataArray?>",
"height", "<?=HEIGHT ?>",
"align", "middle",
"id", "AdServer",
"quality", "high",
"bgcolor", "#555555",
"name", "AdServer",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", "http://www.adobe.com/go/getflashplayer"
);
} else { // flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be placed here. '
+ 'This content requires the Adobe Flash Player. '
+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
document.write(alternateContent); // insert non-flash content
}
// -->
</script>
<noscript>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
id="AdServer" width="<?=WIDTH ?>" height="<?=HEIGHT ?>"
codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab">
<param name="movie" value="AdServer.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#555555" />
<param name="bgcolor" value="#555555" />
<param name="flashVars" value="str=<?=$dataArray?>" />
<param name="allowScriptAccess" value="sameDomain" />
<embed src="AdServer.swf" quality="high" bgcolor="#555555"
width="<?=WIDTH ?>" height="<?=HEIGHT ?>" name="AdServer" align="middle"
play="true"
loop="false"
flashVars="str=<?=$dataArray ?>"
quality="high"
allowScriptAccess="sameDomain"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/go/getflashplayer">
</embed>
</object>
</noscript>
【问题讨论】:
-
你能提供你的flash的嵌入代码吗