URL rewriting problem

K

KMA

My site has dynamicaly generated pages. Most of the URLs are false, and I
used to trap them in a generic 404 page, which stripped off a unique part of
the URL, built the page then sent that back to the client. But then the
address bar always showed the 404 plus the query string which contains the
originally requested URL. Apart form that all was well.

So to circumvent this I used URL rewriting in Global.asax. Same idea, just
look for incoming URL that doesn't correlate to physical page then
dynamically generate page and return it.

The strange this is this:
With the old system the page displayed perfectly.

With the new way the pictures don't display, and the links are broken. When
I hover over a link I see that the link includes an extra sub dir. For
example, in the old working way I get (for the "Home" link) /Default.aspx,
and for the new not working way I get /Articles/Default.aspx. The pseudo
page lies in the Articles section.

I've run the app through in both working and non-working ways, and saved the
source from each output. The source is identical. And there is no mention of
"Articles" in any link or image URL. So my question is this: Does the client
software somehow store a "base directory" and prepend this to all relative
URLS? Does using URL rewriting somehow influence this?

I'm not sure my explanantion is very clear, but hopefully someone knows what
I mean.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top