Web Application URL Re-writing

Posted by Mdjack under C# on 7/17/2012 | Points: 10 | Views : 1082 | Status : [Member] | Replies : 3
Hi Friends,

I have on scenario for my development. Can any one Guide / help me for URL Re-writing custom techniques. This is very urgent requirement for me.

I have ASP.NET 3.5 application running under IIS7 under a virtual directory. So the URL of my app is like http://site.com/{0}/{1}/{2}/. . . . /{n}/*.aspx. I want to redirect the request based on the Logged In user credentials to site.com/{0}/default.aspx to site.com/{0} for better SEO.


Thanks,
Mohamed. N

N. MOHAMED ZACKKARIAH


Responses

Posted by: Ranjeet_8 on: 7/17/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down

find Sample code here
http://www.codeproject.com/Articles/2538/URL-Rewriting-with-ASP-NET

Mdjack, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Mdjack on: 7/17/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

Based on the User Login credentials i want to use the URL rewriting without using the IIS settings.

Want to create URL rewrite based on User Id and Password.

On my site I have a several Level. For Example http://site.com/{0}/{1}/{2}/. . . . /{n}/*.aspx
here
1. {0}=> Subscription module
2. {1}=> Tenant/Template module.
3. {2}=>Application/Work space module.
. . .
. . .
. . .
. . .
n. {n}=> DB/ Template Management Module.

In the code behind of my Login.aspx page, I get the userId, Password and pass this to a method in my DAL.GetUserByUserId().
In y database I have a tabl called Members and Application_Mapping tables. The method get the data from members table and display details on the page about the user.
What I want to happen is when they have logged in and are diverted (based on the Application_Mapping table) to corresponding page.




N. MOHAMED ZACKKARIAH

Mdjack, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Datagenius on: 1/29/2014 [Member] Starter | Points: 25

Up
0
Down
What is URL Rewriting ?
Most dynamic websites include variables in their URLs that tell the site what information to show the user. Typically, this gives Below urls
for example:-
http://www.datagenius.co.nz/show_a_product.php?product_id=7
(The problems with this kind of URL structure are that the URL is not at all memorable. It's difficult to read out over the phone)
Easily replace Web application URLs to produce user and search engine friendly results
URL Rewrite permits Web administrators to easily replace the URLs generated by a Web application in the response HTML with a more user friendly and search engine friendly equivalent. Links can be modified in the HTML markup generated by a Web application behind a reverse proxy.



Mdjack, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response