ASP.NET Url Rewrite - ASP.NET/IIS VS PHP/Apache
Programming January 11th, 2008Have you ever realized how difficult url rewrite can be in ASP.NET which is hosted in IIS?
If you are coding php and hosting it on an apache server, your job is pretty easy. You may just write appropriate
matchings for your urls ( this is typically done by regular expressions ) in htaccess file. However this is not just that easy on IIS. You may ask, why the subject contains “ASP.NET”, this is because IIS is just used to host ASP.NET in usual. You may host ASP.NET on your apache, but the hosting firms in the market do not use apache servers for ASP.NET. They use IIS.
Url rewriting can be made in few ways, with ISAPI modules, or you may configure IIS to direct .html or anyother extensions to ASP.NET dll. However you need to access your IIS server.If you are using a shared hosting like me
, you may be disappointed but you should accept that you can only do url rewrites which ends in .aspx extension, because IIS directs .aspx extensions to asp.net dll, and your custom rewrites in your global.asax will run before IIS gives an “404 Not Found Error”.
Yes I hate .aspx/.php or any other extensions different than .html. Not only me prefer .html , but also Google prefers .html extensions, and most likely to index that pages.Briefly the same situation can happen if you host php on IIS (which is pretty a dumb action to do), as a result this is not related but .NET, but again If we consider php/apache bros. they gain +1 against asp.net/IIS .
Technorati Tags: ASP.NET, URL Rewrite, IIS, PHP, Apache
Some other posts that you may like :
C# and Inline AssemblyNokia E65 - A swiss knife
Coolest Robot Ever : Asahi Beer Robot V.2
Wireless Pen Mouse
Hard Disk Desk Clock
Extreme Notebook Chip ' Bearlake ' Chipsets
Online Money Making Resources
Kaspersky Removes Adsense Advertisements
Starcraft Proxy Problem
C# Mail Client & Sending Mail With C# .NET

























































Recent Comments