views:

33

answers:

2

Hello guys,

I'm using urlrewriting to rewrite my url. Let me introduce my problem by bellow example:
Here is old url: http://localhost/test/pages.aspx?pageid=1
I have 2 cases to rewrite:

  1. http://localhost/test/url-rewriting-get-start.aspx
  2. http://localhost/test/url-rewriting/get-start.aspx

The first case is ok, but I would like to use the second case. In this case I must use root path for image, css and object tag (for flash):

  • With image, I modified to: <image src="~/images/icon.jpg" runat="server"/>
  • With css, I modified in head tag: <head runat="server">
  • But with the object tag, I don't know how to set root for the data, movie parameter:

    <object data="anim/head.swf?xmlPath=./menu_flash.html" type="application/x-shockwave-flash" width="962" height="228"> <param name="movie" value="anim/head.swf" /> <param name="quality" value="high" />

Anyone have solution for this, please help me. Thanks in advance.

Regards,
Tien

A: 

If the flash movie is in the root folder of your website, you could write the tags as either:

<object data="/anim/head.swf?xmlPath=./menu_flash.html" type="application/x-shockwave-flash" width="962" height="228">
<param name="movie" value="/anim/head.swf" />
<param name="quality" value="high" />

OR

<object data="http://localhost/anim/head.swf?xmlPath=./menu_flash.html" type="application/x-shockwave-flash" width="962" height="228">
<param name="movie" value="http://localhost/anim/head.swf" />
<param name="quality" value="high" />

Hope this helps!

timothyclifford
Thanks for your help.
White Money
You're welcome, if it doesn't work let me know :)
timothyclifford
A: 

Why can't you use root path in param tag?

<param name="movie" value="/[path starting from root]/anim/head.swf" />

Alternatively, you can use server tags to resolve path such as

<param name="movie" value='<%= this.ResolveUrl("/[path starting from root]/anim/head.swf") ' />
VinayC
Hi, Thank you. This statement help me alot
White Money