Solved

Web URL to aspx variable

Posted on 2012-03-18
6
229 Views
Last Modified: 2012-03-28
Hi guys,

I have a website where I want the user to type in something like this:

www.mywebsite.com/90820 

... and the page automatically forward to:

www.mywebsite.com/webpage.aspx?Variable=90820

Does anyone know who to do this?  Preferably in ASP.NET VB.

Thanks :)
0
Comment
Question by:jamie77777
6 Comments
 
LVL 5

Assisted Solution

by:Rainverse
Rainverse earned 500 total points
ID: 37735919
0
 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
ID: 37735962
URL rewriting is the best method to use.   However, there is an alternative in simply adding a redirect script on an index page under an actual folder.  http://support.microsoft.com/kb/312063
0
 
LVL 16

Expert Comment

by:Rose Babu
ID: 37737300
If you are using Win 2003 server then install urlrewriter module as described in http://urlrewriter.net/index.php/support/installation/windows-server-2003

Then in your web.config file add rewrite rule

<rewrite url="^/(.+)$" to="/webpage.aspx?Variable==$1" processing="stop" />

http://urlrewriter.net/index.php/support/configuration
http://urlrewriter.net/index.php/support/reference/actions/rewrite

To get the Intelligencia.UrlRewriter.dll file

get the source from https://github.com/sethyates/urlrewriter/downloads
extract the source and build it to get dll.(find the dll in \bin\Debug folder)

Try this.
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 16

Expert Comment

by:Rose Babu
ID: 37756802
any luck?
0
 

Accepted Solution

by:
jamie77777 earned 0 total points
ID: 37758770
Thanks for all your help guys... eventually went with this :)

http://learn.iis.net/page.aspx/461/creating-rewrite-rules-for-the-url-rewrite-module/
0
 

Author Closing Comment

by:jamie77777
ID: 37775746
Complete
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question