473,386 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Tricky URL Rewrite question

aag
Hey there! I've got an URL rewrite issue that I'm wondering if the
masters out there can help with :)

I have a site that resides at (for example) foo.com - it's a full
site with tons of pages that users would need to get access to.

However, I'd like to have a special feature of that same ASP.NET
application such that if a users goes to:

bla.foo.com/name

It would actually redirect via URL rewrite to foo.com/function.aspx?
ident=<i>name</i>

Is that possible? Or do I need to write an HTTP handler to intercept
ALL http traffic, search for the URL, forward if necessary, or pass on
to the default handler if not? (how do you pass a request on to the
default handler in an HTTP Handler, anyway?)

Sep 15 '08 #1
3 1190
aag wrote:
Hey there! I've got an URL rewrite issue that I'm wondering if the
masters out there can help with :)

I have a site that resides at (for example) foo.com - it's a full
site with tons of pages that users would need to get access to.

However, I'd like to have a special feature of that same ASP.NET
application such that if a users goes to:

bla.foo.com/name

It would actually redirect via URL rewrite to foo.com/function.aspx?
ident=<i>name</i>

Is that possible? Or do I need to write an HTTP handler to intercept
ALL http traffic, search for the URL, forward if necessary, or pass on
to the default handler if not? (how do you pass a request on to the
default handler in an HTTP Handler, anyway?)
You can put code in the Application_BeginRequest method in global.asax
to check the url of every request that reaches the ASP.NET engine.
However, that only works for requests that actually are handled by
ASP.NET, which an url like bla.foo.com/name is not.

The same goes for an HttpHandler, it can only catch requests that are
handled by ASP.NET.

We use a component named IIS Mod-Rewrite. It's an ISAPI dll that gets
installed in the web application in IIS, and it intercepts the request
before it's handled.

There are some free components out there also, unless your server is 64-bit.

--
Göran Andersson
_____
http://www.guffa.com
Sep 15 '08 #2
aag
Unfortunately, we are indeed using 64 bit - however, I'm pretty sure
we're using "urlreqwriting.net" already. I'll have to see how that
works... do you think that could do the job for us?

We're running Windows Server 2008 and IIS7, so that might give us some
additional leeway in forwarding all requests to the ASP.NET handler,
but I'm not quite sure on the exact steps I should take for that.

However - you're sure that bla.foo.com/name wouldn't be handled by
ASP.NET? I mean, doesn't it attempt to look for default.aspx in the
directory "bla.foo.com/name", or does it do a redirect first before
being processed by ASP.NET?

Thanks for answering and helping...! It's greatly appreciated.


On Sep 15, 5:48*am, Göran Andersson <gu...@guffa.comwrote:
aag wrote:
Hey there! *I've got an URL rewrite issue that I'm wondering if the
masters out there can help with :)
I have a site that resides at (for example) *foo.com - it's a full
site with tons of pages that users would need to get access to.
However, I'd like to have a special feature of that same ASP.NET
application such that if a users goes to:
bla.foo.com/name
It would actually redirect via URL rewrite to foo.com/function.aspx?
ident=<i>name</i>
Is that possible? *Or do I need to write an HTTP handler to intercept
ALL http traffic, search for the URL, forward if necessary, or pass on
to the default handler if not? *(how do you pass a request on to the
default handler in an HTTP Handler, anyway?)

You can put code in the Application_BeginRequest method in global.asax
to check the url of every request that reaches the ASP.NET engine.
However, that only works for requests that actually are handled by
ASP.NET, which an url like bla.foo.com/name is not.

The same goes for an HttpHandler, it can only catch requests that are
handled by ASP.NET.

We use a component named IIS Mod-Rewrite. It's an ISAPI dll that gets
installed in the web application in IIS, and it intercepts the request
before it's handled.

There are some free components out there also, unless your server is 64-bit.

--
Göran Andersson
_____http://www.guffa.com- Hide quoted text -

- Show quoted text -
Sep 15 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: JZ | last post by:
Oracle 9iR2 I have a table: SQL> select * from test; A B C ------------------- ---------- ---------- 01/01/2004 10:00:00 1 1...
0
by: Piotr Szukalski | last post by:
Hi! I have a quite tricky question about .NET debugger: do I need to install the whole SDK to make SDK CLR debugger working? The situation is as follows: I have an application deployed to 130...
25
by: PyPK | last post by:
What possible tricky areas/questions could be asked in Python based Technical Interviews?
8
by: pras.vaidya | last post by:
Hi , below given question was asked to me during an interview and i figured it out little tricky . It would be a great help if anyone could solve it. Code : - main() { char...
2
by: VM | last post by:
I'm about to work on a 'buggy' WIndows C GUI application that was entirely made in C. All the user controls were all hard-coded and the code is pretty hard to understand. The application was made...
5
by: T | last post by:
Hi group, I'm trying to create a temporary replacement scheme for a particular url that gets generated all over an existing app. It would be very difficult to find every spot where the url gets...
14
by: felixnielsen | last post by:
Consider this 3d vector: const SIZE = 'some_size'; std::vector<std::vector<std::vector<char> > >GRID(SIZE, std::vector<std::vector<char> >(SIZE, std::vector<char>(SIZE))); It can be viewed...
14
by: Stan Canepa | last post by:
This post is mostly for discussion. Why rewrite in .NET? Just a general discussion not related to any specific details. I was just looking to see what reasons developers are looking to, to help...
4
by: mainargv | last post by:
hi How do you rewrite codes with " ... va_list va_start va_etc", so that simple c compiler don't have to deal with them. I have written a simple c->verilog compiler but it can't deal with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.