I am using Intelligencia.UrlRewriter to rewrite my urls.
My problem is that if I rewrite my urls my image paths and links within the page all adopt the new formated url path.
I am using a database lookup to replace the url like so.
string urlPath = Context.Request.Path.ToStr
string replacement = "";
Manager manager = new Toyota.CMS.Web.App_Files.F
replacement = manager.MapFriendlyURL(url
urlPath = urlPath.Replace(urlPath, replacement);
The url rewriting works fine but it makes my images and styles display incorrectly.
Correctly maps to www.mysite.co.za/products.aspx?ProductId=1
But all my image paths and links change from
but they should be
Is there a way to handle these without having to change the entire page.
I have done something like this in the webconfig but it does not seem to be working correctly.
<rewrite url="/App_Themes/(.+)" to="~/App_Themes/$1" />
<rewrite url="/images/icons/(.+)" to="~/images/icons/$1" />
<rewrite url=".*/PictureData/(.+)" to="~/PictureData/$1" />
<rewrite url=".*/PictureData/.*" to="~/PictureData/$1" />
+)" to="~/includes/$1" />-->
/(.+)" to="~/PictureData/$1" />
Basically I want to remove the products/product_1 from all other urls in the page.