url friendly rewrite

Hello,

I have 2 pages: page1.aspx and page2.aspx

I want to rewrite like this:

page1.aspx?x=nnn => /nnn

page2.aspx?y=mmm => /mmm

Is it possible to know which long url is started from when a short url is entered?

Kind Regards


Please give us feedback no matter whether you get your answer.
Please "mark as answer" if it's useful for you

Sincerely,
SpongeBert
0
SpongeBert
5/4/2009 11:55:55 PM
asp.net.getting-started 91979 articles. 2 followers. Follow

2 Replies
469 Views

Similar Articles

[PageSpeed] 7

 You need to be able to distinguish between the pages with a regular expression. That means you need a common pattern that will be reconized and will be used to redirect to the real page. You patterns could be like this:

/year/month/day/permanent-link => page.aspx?y=year&m=month&d=day&permalink=permanent-link

/category/category-name => categories.aspx?category=category-name

/tag/tag-name => tags.aspx?tag=tag-name

Having said that, url rewriting is kind of a pain since you have different ways of doing it in IIS 6 or II 7.

I have writen a post on my blog about my experiences on rewriting: http://www.gbogea.com/2009/05/01/lessons-learned-in-url-rewriting

Maybe this is useful to you.


Gabriel Bogéa (http://www.gbogea.com)
-----------------
Please 'Mark as Answer' the post(s) that helped you
0
gbogea
5/5/2009 12:40:56 AM
Reply:

Similar Artilces:

URL Rewrite with URL Rewriter for .NET
 I am trying to set up the URLRewriter for .NEt and am having trouble setting it up.The code I have in my web.config has all the code in the right place and The following is the URL rewrite rules:<rewriter>            <rewrite url="/forums/(.+)/$" to="/forums/ViewForum.aspx?forum=$1" />            <rewrite url="/forums/(.+)/(.+)/$" to="/forums/ViewTopic.aspx?forum=$1&topic=$2" />      &nb...

URL Rewrites & Friendly URLs
Hey all, I have been reading a tone of articles and trying many different things to achieve what I am trying to do, and so far I keep hitting brick walls. Scenario, I am building a datadriven extranet site for my company on a shared hosting server (GoDaddy) to facilitate a request that all of our offices world wide can access company and product bullitens, certain employees mainly supervisors and department managers are being given the abbility to create their own webspace on the site to highlight different events going on company wide. So my thought was to create a myspace style sit...

URL Rewrite using .NET ThunderMain.URLRewriter.Rewriter
Hello, I wonder if anyone used url rewrite explained in this page http://www.codeproject.com/aspnet/URLRewriter.asp Can you share your experience? Does Go*gle loves it, and spider it?...

Url rewriting with Url rewriter module
Hi, I've applied very simple rule for rewriting URLs on IIS 7, but I've been experiencing some problems with it. I have some links on my homepage (http://localhost/MyWeb). One test asp:hyperlink with NavigateUrl="~/" (so href="http://localhost/MyWeb/"). and some links looking like "http://localhost/MyWeb/Pages/1-page; http://localhost/MyWeb/Pages/2-page". After clicking one of these links and going to page with rewritten URL, my test link href changes to "http://localhost/MyWeb/Pages/". Do you have any idea why it happens and how to fix ...

Getting Start With .net
hi i'm intersted to learn asp.net (vb or delphi) . i programming with delphi6 but i'd like to tp know something about programming in internet specially with .net . i hear about microsoft.net with delphi 7 that i can programming with delphi in .net .... is it right ? what 's our opinian about it ? and better to learn Vb.Net or continu with delphi(or delphi.net) thanks. Ali Darabian I think there is some support for Delphi in .Net. However, you will find much more support from the user community if you choose a more popular language such as VB.Net or C#. Since your al...

URL rewriting in .net
 Hi Is URL rewriting and URL mapping same in .net 2.0 Kindly adviceRegardsKaranRegardsKaran GuptaFor .net,Javascript and Sql server articles and interview question visithttp://guptakaran21.googlepages.com/main URL Rewriting is the process of intercepting an incoming Web request and redirecting the request to a different resource. When performing URL rewriting, typically the URL being requested is checked and, based on its value, the request is redirected to a different URL. Url Mapping provides a simple way to map a long URL to a short URL with the help of <urlMap...

URL rewriting in .net
Hello,I wish to rewrite url with username. Currently my url looks like this: http://www.abcdefg.com/logged.aspxi wish to change it to http://username.abcdefg.com or http://www.abcdefg.com/usernamewhere username is the name of logged in user.Can someone help with this thing?thanks in advance.  Hi You can present the http://www.abcdefg.com/logged.aspx?username=angler in this form:  http://www.abcdefg.com/angler   Here is a good article about how to serve extensionless URL from ASP.NET. Hope that's exactly what you want. http://msmvps.com/blogs/omar/archive/2...

Friendly Urls/rewriting
Hi.  I am trying to follow directions from the forums to rewrite my Search and ShowAd page urls. The instructions I tried to follow were from an old posting about a site www.pagineannunci.it and they seemed to work on that site so I copied them exactly as I could.  I have copied UrlRewritingNet.UrlRewriter.dll into my bin directory and added the following to my web.config file.  My site didn't crash, but my url didn't change either.  Has anyone successfully added the category and title description to the ShowAd url in place of the ID number?  ...

how to get start with .NET
the net help people installed  to my desktop 1-microsoft visual studio .NET enterprise developer 2003 2-microsoft .NET framework 1.1 what else do i need ...???  and how can i try with some simple code in VS.Net and run it to see wat happen...????? please help If you want to develope web applications, then you'll also need IIS on your PC.  That'll require XP-Professional or Windows 2000/2003, but XP-Home edition won't allow IIS installation. As for how to get started, you can search the web for some tutorials or buy a good book on VS.  The topic is way too vast to...

URL Rewrite rewriting to wrong URL on Post Back
Hi guys,  I have an URL rewriting system in place that works by taking a URL like so: /Klinica/Beisdorf/Nivea/After_Shave/Default.aspx and splits it up using the / as a split point.  It then takes the name eg. "Klinica" and looks for the correspond category ID in the database (eg. 1), which it then adds to a string (Products.aspx?Category=1).  This happens for the all the values (Beisdorf, Nivea, etc) which finally ends up with the new URL to be rewritten to : Products.aspx?Category=1&SubCat=5&SubSub=4. Once it has done this it rewrites the requested Origin...

Where to start and how did you get started?
Hi, I have had a feeling for a long time to jump into the adds market for some time due to my low income (shooting for the stars) and I don't have anything better to do these days. But I find it really difficult not to give up due to lack of guides (what I can find atleast) and all the hard words which only makes me confused. But I won't give up. Never. Not sure if this is the right place to post this, but I deffinitly would be really greatfull for help getting started. How did you get started? +If there are any teacher that wanna show me the ropes private, I can give payment with ...

vb.net url rewriting
Anyone have a sample of how I can rewrite a URL in VB.NET? There a tons of C# examples on the web, but no VB that I have found. The goal is to be able to change the URL to: http://www.website.com/URLSuffix The URLSuffix is just a string I need to add based on who is logged in to the site. Everything else is developed except rewriting the URL to read the before mentioned example. Any suggestions?Kevin R Hurst I did a google search for 'url rewrite "vb.net"' and came up with this on the third result: http://www.ragingsmurf.com/code.aspx?key=SHBDC3WNMY Is that g...

rewrite url and get parameters
Hi all I like to write url in this form example : www.mydomainame.com/default.aspx/variable.valiue/variable2.value2/default.aspx ok here no metter to tranmit the url but how coud i take the value of variable which is "value" and the value of variable2 which is "value2" any suggestion or a function works by using C# please. Thank you for replying. Hi, This article might help: http://www.csharpfriends.com/Articles/getTip.aspx?articleID=215 Regards,...

url rewriting with urlrewriter.net
Hi,  I'm implementing urlrewriter.net. I want to create a custom class in my web project (based on the sample in the help : public class MakeDashTransform : IRewriteTransform{public string ApplyTransform(string input){// Replace all underscores with dashes…return input.Replace("_", "-");} public string Name{get{return "makedash";}}} In the web.config I need to add <rewriter> <register transform="MyNamespace.MakeDashTransform, MyAssembly" /> <rewrite url="/([^\.]+)(\.aspx.+)" to="/${makedash($1)}$2&quo...

Web resources about - url friendly rewrite - asp.net.getting-started

190th Fighter Squadron, Blues and Royals friendly fire incident - Wikipedia, the free encyclopedia
The 190th Fighter Squadron, Blues and Royals friendly fire incident was a friendly fire incident involving two United States Air Force (USAF) ...

Wildfire Shows How (And Why) To Make Your Facebook Campaign Influencer-Friendly
On Facebook, not all fans are created equal . Certain people have a little more influence than others — when they recommend a brand’s page or ...

Enhanced Family and Children-Friendly Inflight Zone on Our New A380 Economy Main Cabin
Malaysia Airlines will soon join the league of A380 operators, when its first A380 takes to the skies on 1 July 2012. Although the national carrier ...

Friendly, Facepad Grab 2 Million Monthly Actives on the iPad as Facebook Holds Off on Official App
Facebook’s deliberate approach to designing and launching its long-anticipated iPad app has created an opening for enterprising developers. Two ...

Mr Friendly (@MisterFriendly) on Twitter
Sign in Sign up To bring you Twitter, we and our partners use cookies on our and other websites. Cookies help personalize Twitter content, tailor ...

A friendly reminder about password security - Twitter Blogs
... moment to remind you of best practices... Skip to main content Blog Have an account? Sign in Search form Search All Twitter Blogs &nbsp A friendly ...

Friendly Plus for Facebook for iPad on the iTunes App Store
Read reviews, get customer ratings, see screenshots, and learn more about Friendly Plus for Facebook on the App Store. Download Friendly Plus ...

British Airways to make London’s Heathrow Apple Watch-friendly
... rapidly adopting Apple Watch for their boarding passes, and one airline has recognized that enough to prompt it into adopting new wrist-friendly ...

AMD announces powerful and wallet-friendly Radeon R9 380X graphics card
While Intel and Nvidia produce some amazing hardware, I always have a place in my heart for AMD. True, the company often lags behind Intel for ...

Electric cars: Norway's latest climate-friendly trend
The Norwegian government is encouraging drivers to buy electric cars by offering incentives that are hard to turn down

Resources last updated: 12/9/2015 5:18:39 PM