G
Guest
Hi guys
I'm having trouble with URL rewriting using
HttpApplication.Context.RewritePath in a web application I've created.
Everything works, but the links (css, images) in the pages break when I do a
URL rewrite.
For example, my masterpage has css links in the header to
"~/_css/myfile.css". The masterpage is in a folder called "/_mp".
The files default.aspx and contactus.aspx (both in the root) work fine, and
display the masterpage with all the styles and images.
However, if I go through my url rewriter (say, by visiting
localhostort/myweb/contactus/ - where i've mapped /contactus/ to go to
/contactus.aspx), then the page loads, but none of the images or CSS work.
Could someone provide me with a link or info on how URL rewriting works,
specifically in relation to css/images, and when using the built-in server in
VS. It didn't work at all until I set my rewrite path to
"/myweb/contactus.aspx", and it won't let me use "../" or "./" or "~/" - it
says that's outside the application?
Some help and understanding required, thanks!
Dan
I'm having trouble with URL rewriting using
HttpApplication.Context.RewritePath in a web application I've created.
Everything works, but the links (css, images) in the pages break when I do a
URL rewrite.
For example, my masterpage has css links in the header to
"~/_css/myfile.css". The masterpage is in a folder called "/_mp".
The files default.aspx and contactus.aspx (both in the root) work fine, and
display the masterpage with all the styles and images.
However, if I go through my url rewriter (say, by visiting
localhostort/myweb/contactus/ - where i've mapped /contactus/ to go to
/contactus.aspx), then the page loads, but none of the images or CSS work.
Could someone provide me with a link or info on how URL rewriting works,
specifically in relation to css/images, and when using the built-in server in
VS. It didn't work at all until I set my rewrite path to
"/myweb/contactus.aspx", and it won't let me use "../" or "./" or "~/" - it
says that's outside the application?
Some help and understanding required, thanks!
Dan