For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > January 2007 > Trouble with QueryString









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Trouble with QueryString
Roshawn

2007-01-30, 10:08 pm

Hi,

I access a particular page by specifying the page's name and extension like so:

http://localhost:xxxx/MyFiles/Lucky/

The Lucky directory contains a webpage named Default.aspx. I can access is without needing to type in the page's name and
extension. This page uses a querystring and is only specified when needed (e.g. keywords=sam). My trouble is that if I
access the page without specifying the page's name and extension, somehow the querystring is given a value on its own.
Debugging reveals that the querystring contains the value of "default.aspx"

What could be causing this issue? I've been at this for a few hours now with no luck. Any help would be greatly appreciated.

Thanks,
Roshawn
Mark Fitzpatrick

2007-01-30, 10:08 pm

Roshawn,
Are you doing any URL rewriting or redirection? I've seen this
before when doing redirection and not filtering out the default page as a
possible value.

--

Hope this helps,
Mark Fitzpatrick
Former Microsoft FrontPage MVP 199?-2006
"Roshawn" <radawson218@yahoo.com> wrote in message
news:%2374iTQNRHHA.2124@TK2MSFTNGP06.phx.gbl...
> Hi,
>
> I access a particular page by specifying the page's name and extension
> like so:
>
> http://localhost:xxxx/MyFiles/Lucky/
>
> The Lucky directory contains a webpage named Default.aspx. I can access
> is without needing to type in the page's name and extension. This page
> uses a querystring and is only specified when needed (e.g. keywords=sam).
> My trouble is that if I access the page without specifying the page's name
> and extension, somehow the querystring is given a value on its own.
> Debugging reveals that the querystring contains the value of
> "default.aspx"
>
> What could be causing this issue? I've been at this for a few hours now
> with no luck. Any help would be greatly appreciated.
>
> Thanks,
> Roshawn



Roshawn

2007-01-31, 7:13 pm

Hmm, you're absolutely right!

I am doing URL rewriting, using Regex of course. I discovered that one of my Regex rules was incorrect. That's what was
causing the trouble as I wasn't filtering out the default page.

Thanks for the help, :-)
Roshawn

Mark Fitzpatrick wrote:
> Roshawn,
> Are you doing any URL rewriting or redirection? I've seen this
> before when doing redirection and not filtering out the default page as a
> possible value.
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com