Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net (http://www.velocityreviews.com/forums/f29-asp-net.html)
-   -   QueryString alternative (http://www.velocityreviews.com/forums/t82984-querystring-alternative.html)

Mehdi 07-18-2004 11:27 PM

QueryString alternative
 
Hi,

How can I get userid "SimonJ" from www.mysite.com/SimonJ instead of
www.mysite.com/default.aspx?userid=SimonJ without creating the physical
directory for SimonJ on the web server?



Regards


Mehdi






Ken Cox [Microsoft MVP] 07-19-2004 12:08 AM

Re: QueryString alternative
 
It sounds like you want to create a "vanity URL". There's info on this page
if you scroll down to the heading:

Handling the Application_BeginRequest Event

http://www.samspublishing.com/articl...27315&seqNum=3

Ken


"Mehdi" <nospam@leavemealone.nowhere> wrote in message
news:uKAlW7RbEHA.3596@tk2msftngp13.phx.gbl...
> Hi,
>
> How can I get userid "SimonJ" from www.mysite.com/SimonJ instead of
> www.mysite.com/default.aspx?userid=SimonJ without creating the physical
> directory for SimonJ on the web server?
>
>
>
> Regards
>
>
> Mehdi
>
>
>
>
>



Mehdi 07-19-2004 08:01 PM

Re: QueryString alternative
 
Ken,

I tried it, but in the example it claims that it will work in scenarios like
http://www.superexpert.com/swalther but after presenting the code, it tests
it with http://superexpert.com/swalther.aspx

Basically it will work if "swalther" has an ".aspx" at the end. But the
problem is if http://superexpert.com/swalther is typed in the address bar,
web server expects presence of "swalther" folder which doesn't exists and
throws "The page cannot be found" error before getting to
Application_BeginRequest Event.

I'll keep you and the group posted if I find the solution.

Thanks for replying.


Regards


Mehdi




Ken Cox [Microsoft MVP] 07-20-2004 01:41 AM

Re: QueryString alternative
 
You might want to ping Stephen about that. He's an MVP and might be
interested in your thoughts/needs.

"Mehdi" <nospam@leavemealone.nowhere> wrote in message
news:e99iiscbEHA.3148@TK2MSFTNGP10.phx.gbl...
> Ken,
>
> I tried it, but in the example it claims that it will work in scenarios
> like
> http://www.superexpert.com/swalther but after presenting the code, it
> tests
> it with http://superexpert.com/swalther.aspx
>
> Basically it will work if "swalther" has an ".aspx" at the end. But the
> problem is if http://superexpert.com/swalther is typed in the address bar,
> web server expects presence of "swalther" folder which doesn't exists and
> throws "The page cannot be found" error before getting to
> Application_BeginRequest Event.
>
> I'll keep you and the group posted if I find the solution.
>
> Thanks for replying.
>
>
> Regards
>
>
> Mehdi
>
>
>



Joerg Jooss 07-31-2004 01:27 PM

Re: QueryString alternative
 
Mehdi wrote:
> Ken,
>
> I tried it, but in the example it claims that it will work in
> scenarios like http://www.superexpert.com/swalther but after
> presenting the code, it tests it with
> http://superexpert.com/swalther.aspx
>
> Basically it will work if "swalther" has an ".aspx" at the end. But
> the problem is if http://superexpert.com/swalther is typed in the
> address bar, web server expects presence of "swalther" folder which
> doesn't exists and throws "The page cannot be found" error before
> getting to Application_BeginRequest Event.


ISAPI extensions (like ASP.NET) work based on file extensions. If you need
to do without, you probably need another Web server in front that allows for
more flexible URL rewriting patterns.

Cheers,
--
Joerg Jooss
joerg.jooss@gmx.net


Mehdi 08-01-2004 03:11 PM

Re: QueryString alternative
 
Jeorg,

It seems that I am going to end up creating a dedicated folder and
default.aspx for each user. Having another server as you mentioned will not
be possible for me, as I am hiring a shared IIS for my site.


Thanks for replying anyway.


Regards


Mehdi



Saber 08-01-2004 03:55 PM

OFF-TOPIC
 
Mehdi,
Would you please email me at saber <(*at*> maghalat.com ?
akhe az esmet intor be nazar mire zabune mano mifahmi!

(sorry for such post)

"Mehdi" <nospam@leavemealone.nowhere> wrote in message
news:edTlan9dEHA.596@TK2MSFTNGP11.phx.gbl...
> Jeorg,
>
> It seems that I am going to end up creating a dedicated folder and
> default.aspx for each user. Having another server as you mentioned will
> not
> be possible for me, as I am hiring a shared IIS for my site.
>
>
> Thanks for replying anyway.
>
>
> Regards
>
>
> Mehdi
>
>





All times are GMT. The time now is 08:34 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.