473,395 Members | 1,639 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,395 software developers and data experts.

URL rewriting and web.config

Shinobi
I am using ASP.net(c#) for my project. In my my project 2 pages are using URL rewriting method by referring this article

URL Rewriting using Intelligencia UrlRewriter Example 1 - Blog Day Afternoon

from my form i used this code.
Response.Redirect("showdetails/" + a);

in my Web.config
Expand|Select|Wrap|Line Numbers
  1. <system.webServer>
  2.     <modules runAllManagedModulesForAllRequests="true">
  3.       <add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule"/>
  4.     </modules>
  5.     <validation validateIntegratedModeConfiguration="false"/>
  6.   </system.webServer>
  7.   <rewriter>
  8.    <rewrite url="~/showdetails/(.+)" to="~/details.aspx?id=$1" permanent="true"/>
  9. </rewriter>
these are the code i used.
this code rewrite my url like this
example

But i wantto remove that "showdetails" part from url and.
create a valid url like this
example
if i copy paste this link into address bar it must work.
If i remove that string, then other pages(Normal pages ending with extension
like index.aspx) they got error.

can i check extension in web.config.? Or is there is any other way for url rewriting?

Please help me...
Dec 29 '08 #1
1 7862
Frinavale
9,735 Expert Mod 8TB
Have you tried adding rewrite entries for the regular pages as well?
Since you are removing the "showdetails" from the URL, the server still needs to be able to map to the files in the "showdetails" directory...which means you have to map to the files that you want to use.
Dec 30 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Michael Appelmans | last post by:
I'm trying to use a rule based URL rewrite application which uses HttpApplication.RewritePath. I keep getting "rsource not found" error in application when running on shared web host although the...
0
by: Lee | last post by:
Hi all ;) Preamble -------- I'm using URL rewriting to enforce a frames policy (yeah, I know frames are 'bad' :) - i.e. if a request comes in for a page which should be nested within a...
0
by: Netveloper | last post by:
Hi, I'm playing around with url rewriting and I have come across a problem which I can't seem to get past. The general ide is to have a IHttpHandlerFactory class which checks the incoming...
3
by: Smokey Grindel | last post by:
I am using ASP.NET 2.0 and know about the static list in the web.config for URL rewriting, but my list is dynamic and I am running into some problems... 1) How do you get URL rewriting to work in...
3
by: Greg Collins [Microsoft MVP] | last post by:
I have done a bit of research of Url Rewriting, but as yet have been unsuccessful at getting it to work well, and there are issues around what file types are supported and how much code you want to...
8
by: Christina | last post by:
Hiya!! I am trying to do something really simple here.. I have a link, clicking on which leads to a page say MyPage.aspx. There's a query string also passed to it. Hence its : ...
6
by: chanko | last post by:
hi all! ok i'll try and keep this clean and simple i have a web app where users can log in and manage a mini site (ie galleries, files, news....) and i have a web app which is the site...
0
by: =?Utf-8?B?QmlsbEF0V29yaw==?= | last post by:
Hi, I've implemented a very simple URL rewriter using an HttpModule. It simply intercepts the url, looks it up in a local config table and redirects the browser to a different URL. Of course,...
3
by: Toni | last post by:
Does anyone have a recommended method of rewriting URLs with classic ASP? For example, if the browser shows the Friendly URL www.mydomain.com/blue_widget my app will show the following Content...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.