CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > visual_studio.visual_studio_2005 Tags:
Item Type: Date Entered: 6/22/2005 11:44:04 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 1 Views: 49 Favorited: 0 Favorite
2 Items, 1 Pages 1 |< << Go >> >|
aetherane
Asp.Net User
URL Rewriting on all file extensions6/22/2005 11:44:04 PM

0

I have implemented a IHttpModule URL Rewriting mechanism.  The problem is that it only rewrites urls ending in .aspx.  How could I get it to rewrite urls for ANY extension, including .html and no extension?
adec
Asp.Net User
Re: URL Rewriting on all file extensions6/22/2005 11:53:33 PM

0

First, you need to create mappings in your IIS telling it to handle files with extensions like HTML etc. Normally, only files with extensions directly associated with Asp.Net will be handled by the worker process. Also, you need to create mappings within your app capturing requests, rewriting, and redirecting them. Some thing like this:

<RewriterConfig>
   <Rules>
      <!-- Rules for Blog Content Displayer -->
      <RewriterRule>
         <LookFor>~/(\d{4})/(\d{2})/(\d{2})\.aspx</LookFor>
         <SendTo>~/ShowBlogContent.aspx?year=$1&amp;month=$2&amp;day=$3</SendTo>
      </RewriterRule>
      <RewriterRule>
         <LookFor>~/(\d{4})/(\d{2})/Default\.aspx</LookFor>
         <SendTo><![CDATA[~/ShowBlogContent.aspx?year=$1&month=$2]]></SendTo>
      </RewriterRule>
      <RewriterRule>
         <LookFor>~/(\d{4})/Default\.aspx</LookFor>
         <SendTo>~/ShowBlogContent.aspx?year=$1</SendTo>
      </RewriterRule>
   </Rules>
</RewriterConfig>

This article may come in handy:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/urlrewriting.asp


Regards

Andre Colbiornsen
---------------------------------
[MVP Visual Developer Asp.Net]
Sonnenburg Communications
Friisgatan 33,
SE-214 21 Malm?
Sweden
Mob.: +46-(0)708-97 78 79
Mail: [email protected]
--------------------------------
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional Search Engine Optimization with PHP: A Developer's Guide to SEO Authors: Jaimie Sirovich, Cristian Darie, Pages: 360, Published: 2007
Professional LAMP: Linux, Apache, MySQL, and PHP Web Development Authors: Jason Gerner, Elizabeth Naramore, Morgan Owens, Matt Warden, Pages: 379, Published: 2005
The Definitive Guide to Symfony Authors: Francois Zaninotto, Fabien Potencier, Pages: 486, Published: 2007
Professional Apache Tomcat 6 Authors: Vivek Chopra, Sing Li, Jeff Genender, Pages: 629, Published: 2007
Professional ASP.NET 2.0 Authors: Bill Evjen, Scott Hanselman, Farhan Muhammad, Srinivasa Sivakumar, Devin Rader, Pages: 1253, Published: 2005
Dreamweaver CS3 Bible: Master Every Aspect of Dreamweaver - Work with CSS, Text, Images, And Links - Incorporate Flash Movies and Other Media Authors: Joseph W. Lowery, Pages: 1112, Published: 2007
Professional Community Server Themes Authors: Wyatt Preul, Benjamin Tiedt, Pages: 337, Published: 2007
Professional ASP.NET 3.5: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1673, Published: 2008
Beginning PHP and Oracle: From Novice to Professional Authors: W. Jason Gilmore, Bob Bryla, Pages: 763, Published: 2007
Pro ASP.NET 2.0 Website Programming Authors: Damon Armstrong, Pages: 641, Published: 2005

Web:
IIS7, UrlRewriting, No File Extensions : Simpable Feb 27, 2007 ... Talking about allowing an HttpModule to execute on all requests, without the having configure IIS ... IIS7, UrlRewriting, No File Extensions ...
Rewrite URLs with Content Negotiation - no file extension url ... Oct 19, 2008 ... By rewriting URLs without file extensions to the right resources you can ... inside the gizmo directory looking for all files named thing. ...
File Extensions and URL Rewriting in EPiServer Dec 5, 2008 ... File Extensions and URL Rewriting in EPiServer ... Why not use the extension ' cfm' and then watch and laugh as all the ColdFusion-specific ...
File Extensions - URL Re-writing. - StatCounter User Forum File Extensions - URL Re-writing. ... When you rewrite urls, you must also use the NEW url structure on the website itself in all links. ...
Hide .php extension with url rewriting using .htaccess But there was one flaw in that technique you have had to change the file extension explicitly but in this post I’m going to show you how to rewrite the URL ...
URL Rewriting in ASP.NET (In fact, there doesn't even exist a /Products/Beverages.aspx file on the Web server at all!) Figure 3. Requesting category after rewriting URL ...
Coding Horror: URL Rewriting to Prevent Duplicate URLs >Why should the user be bothered about the file extension? php, aspx, ashx, etc. . In case "asp.net + URL Rewriting" you need to tell your IIS the extension ...
CodeProject: URL Rewriting with ASP.NET. Free source code and ... Jul 4, 2002 ... Demonstrates the use of regular expression-based URL Rewriting, ... file extension (ie all files) and mapped those to the ASP. ...
URL Rewriting | redirecting URLs with Apache’s mod_rewrite ... Feb 12, 2008 ... The period or dot before the file extension is a special character in regular .... A User’s Guide to URL Rewriting with the Apache Webserver ...
Scott on Writing re: Mapping All File Extensions to ASP.NET 3/30/2004 10:59 AM Scott Mitchell. Mark, what might be simplest is to do the URL rewriting at the IIS level. ...

Videos:
Developing JavaScript with Chickenfoot Google TechTalks July 25, 2006 Rob Miller Michael Bolin ABSTRACT Chickenfoot is a Firefox extension that embeds a JavaScript programming ...
Literate functional testing Google London Test Automation Conference (LTAC) Google Tech Talks September 7th, 2006 Presenters: Robert Chatley and Tom White
Affiliate Summit 2006 East -- Straight Talk on Search Engine ... Brief presentation on Search Engine Optimization with a heavy focus on Q&A. A very open, honest and straight to the point discussion about search ...
django: Web Development for Perfectionists with Deadlines Google TechTalks April 26, 2006 Jacob Kaplan-Moss ABSTRACT Django is one of the premier web frameworks for Python, and is often compared ...












gridview delete by role?

keyboard shortcuts for "select tag", "select tag content"?

designer view of aspx won't showup, when view source and then switch to design nothing happens.

cross posback problem

daylight savings & copy website

web deployment

no event in event log after renaming/moving any objects in/between organizational units (ou) in active directory (ad) ?

how to set a bookmark in the debugger, or next to a line of code.

new website templates are not displaying

how to chart in vs2005

web form designer grab handles (for ms ppl?)

release option does not appear in configuration manager's configuration dropdown list, vs 2005

intellisense quit working all of a sudden .net 2.0

datasource configuration question

i cannot open a subfolder

how to get the type of application

not able to update sql tables after upgrading to rtm from beta 2

object not appearing in namespace!

extensibility - uihierarchyitem path question

bind to existing folders in vss 6

what about sourcesafe?

how to convert and existing project to a single dll?

the designer files aren't showing?

asp net 2.0 wizard control - creating dynamic steps

can i use the ie web controls for 2005

trying to populate a drowonlist template field in a gridview in vb.net

vs.2005 toolkit

add-ins problem - sp1

editor (or maybe vsts) mixing up my databinding code?

vs2005 on xp

a simple problem

use team settings file - on a per solution basis?

help! how can i know whick field bounding in detailsview?

vs 2005: team system

where is web application dll now?

code to dll

documentation for vs 2005

deployment in asp.net

align is considered outdated. a newer construct is available.

option to always expand all code sections

asp.net 2.0 tutorial problems

how to write comments for our code?

vs bug, hallucination or stupidity?

debugging winform control in page

can't actually "delete" files from source control

toolbox screwed up and cannot reset! help!

drop down menu from image map

customize precompilation (add post-build event)

create a toolboxitem compatible with the html editor

visual studio 2005 sp1 causes site to be rebuild all the time.

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT