<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.iis.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:cs="http://blogs.iis.net/"><channel><title>Extensibility</title><link>http://forums.iis.net/1030.aspx</link><description>Developers using the IIS platform - this is your Home!  Discuss ISAPI filter or extension development and much, much more.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: dynamic subdomains and extensionless url's - feedback needed!</title><link>http://forums.iis.net/thread/1856167.aspx</link><pubDate>Wed, 12 Sep 2007 07:22:42 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1856167</guid><dc:creator>slov</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1856167.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1030&amp;PostID=1856167</wfw:commentRss><description>&lt;p&gt;What you ask is possible with ISAPI_Rewrite 3.0 &lt;a href="http://www.helicontech.com/isapi_rewrite/"&gt;http://www.helicontech.com/isapi_rewrite/&lt;/a&gt; without having need to script something in ASP. I suggest you to identify &amp;quot;type&amp;quot; of request by appending &amp;quot;group&amp;quot; word to the end of subdomain name instead of ugly &amp;quot;t=1&amp;quot;. So the URL will look like:&lt;br /&gt;&amp;quot;peter.mysite.com/en/blogs&amp;quot;&lt;br /&gt;&amp;quot;SomeNameGroup.mysite.com/en/blogs&amp;quot;&lt;br /&gt;Also it is unclear where page parameter should go to.&lt;/p&gt;
&lt;p&gt;Here is a rules for ISAPI_Rewrite 3.0 syntax:&lt;/p&gt;
&lt;p&gt;RewriteBase /&lt;/p&gt;
&lt;p&gt;RewriteCond %{HTTP:Host} (?!www\.)([^.]+)group\.mysite\.com [NC]&lt;br /&gt;RewriteCond %{REQUEST_FILENAME} !-d&lt;br /&gt;RewriteRule ([^/?]+)(?:/([^/?]+))?(?:/([^/?]+))?/? groupblogs.aspx?name=%1&amp;amp;lang=$1&amp;amp;t=2(?&amp;amp;year=$3) [NC,L]&lt;/p&gt;
&lt;p&gt;RewriteCond %{HTTP:Host} (?!www\.)([^.]+)\.mysite\.com [NC]&lt;br /&gt;RewriteCond %{REQUEST_FILENAME} !-d&lt;br /&gt;RewriteRule ([^/?]+)(?:/([^/?]+))?(?:/([^/?]+))?/? userblogs.aspx?name=%1&amp;amp;lang=$1&amp;amp;t=1(?&amp;amp;year=$3) [NC,L]&lt;/p&gt;
&lt;p&gt;2Jeff: In fact this was a simple search engine friendly URLs question and not extension removal issue. But for those who interested, here is an example how to remove specific (for instance .asp) file extensions form request using ISAPI_Rewrite 3.0 features:&lt;/p&gt;
&lt;p&gt;#Redirect extension requests to avoid duplicate content&lt;br /&gt;RewriteRule ([^?]+)\.asp $1 [NC,R=301]&lt;/p&gt;
&lt;p&gt;#Internally add extensions to request&lt;br /&gt;RewriteCond %{REQUEST_FILENAME}.asp -f&lt;br /&gt;RewriteRule (.*) $1.asp&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;PS: Seems like this forum only operational with IE. Cannot find how to highlight links&amp;nbsp;in Opera, all my links remain plain text :(&lt;/p&gt;</description></item><item><title>Re: dynamic subdomains and extensionless url's - feedback needed!</title><link>http://forums.iis.net/thread/1793897.aspx</link><pubDate>Mon, 09 Jul 2007 15:16:27 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1793897</guid><dc:creator>jeff@zina.com</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1793897.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1030&amp;PostID=1793897</wfw:commentRss><description>&lt;p&gt;Whenever someone wants to do an extensionless URL I always have to ask why?&amp;nbsp; Is there a technical reason?&amp;nbsp; Or do you just want the &amp;quot;look&amp;quot; of another system?&lt;/p&gt;
&lt;p&gt;The best way to use extensionless URLs is to work on a Unix-based system, such as Apache/Linux.&amp;nbsp; The Unix-style file system is designed not to pay attention to extensions, and in fact they aren&amp;#39;t normally used for general files.&amp;nbsp; The Windows file system is based on using extensions to idnetify the file handler.&lt;/p&gt;
&lt;p&gt;Your way might work, but it&amp;#39;s a lot of processing if this is just cosmetic.&amp;nbsp; And your URL showing in the address bar will change to what the rewritten URL is unless you enclose it in a frame or other such trick.&lt;/p&gt;
&lt;p&gt;Jeff&lt;/p&gt;</description></item><item><title>dynamic subdomains and extensionless url's - feedback needed!</title><link>http://forums.iis.net/thread/1790102.aspx</link><pubDate>Fri, 06 Jul 2007 10:05:30 GMT</pubDate><guid isPermaLink="false">50bcf3b4-f6fe-4638-adff-0c150e922e99:1790102</guid><dc:creator>Peter Smith</dc:creator><slash:comments>0</slash:comments><comments>http://forums.iis.net/thread/1790102.aspx</comments><wfw:commentRss>http://forums.iis.net/commentrss.aspx?SectionID=1030&amp;PostID=1790102</wfw:commentRss><description>I need feedback if my approach on the following situation is correct:&lt;br /&gt;&lt;br /&gt;I want my site to have dynamic subdomains with extensionless urls.&lt;br /&gt;So, a user may type &amp;quot;name.mydomain.com/language/page&amp;quot; e.g. &amp;quot;peter.mysite.com/en/blogs&amp;quot;&lt;br /&gt;(the name part in the url may be the name of a group or the name of a user)&lt;br /&gt;&lt;br /&gt;So lets say we have a group named &amp;quot;myGroup&amp;quot; and a user named &amp;quot;peter&amp;quot;&lt;br /&gt;And there are 2 types of blogs: groupblogs (displayed on the groupblogs.aspx) and userblogs (displayed on the userblogs.aspx)&lt;br /&gt;&lt;br /&gt;Valid urls would be:&lt;br /&gt;&amp;quot;peter.mysite.com/en/blogs&amp;quot;&lt;br /&gt;&amp;quot;myGroup.mysite.com/en/blogs&amp;quot;&lt;br /&gt;but they should be directed to different targetpages.&lt;br /&gt;&lt;br /&gt;My approach (please fill in the gaps if any):&lt;br /&gt;&lt;br /&gt;request is sent to IIS: peter.mysite.com/en/blog/2006/t=1&lt;br /&gt;&lt;br /&gt;ISAPI_rewrite always redirects to index.aspx&lt;br /&gt;ISAPI_rewrite rewrites to: http://www.mysite.com/index.aspx?name=peter&amp;amp;lang=en&amp;amp;page=blog&amp;amp;year=2006&amp;amp;t=1&lt;br /&gt;&lt;br /&gt;in
index.aspx I then do the following (QUESTION: does the url the user
sees remain friendly (&amp;quot;name.mydomain.com/language/page&amp;quot;) after this
action?)&lt;br /&gt;&lt;br /&gt;dim name as string=request.querystring(&amp;quot;name&amp;quot;)&lt;br /&gt;dim page as string=request.querystring(&amp;quot;page&amp;quot;)&lt;br /&gt;dim t as string=request.querystring(&amp;quot;t&amp;quot;)&lt;br /&gt;dim lang as string=request.querystring(&amp;quot;lang&amp;quot;)&lt;br /&gt;dim year as string=request.querystring(&amp;quot;year&amp;quot;)&lt;br /&gt;&lt;br /&gt;if page=&amp;quot;blog&amp;quot; then&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;if t=&amp;quot;1&amp;quot; then&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;server.transfer(&amp;quot;www.mysite.com/userblogs.aspx?name=&amp;quot;+name+&amp;quot;&amp;amp;lang=&amp;quot;lang+&amp;quot;&amp;amp;t=&amp;quot;+t+&amp;quot;&amp;amp;year=&amp;quot;+year)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;server.transfer(&amp;quot;www.mysite.com/groupblogs.aspx?name=&amp;quot;+name+&amp;quot;&amp;amp;lang=&amp;quot;lang+&amp;quot;&amp;amp;t=&amp;quot;+t+&amp;quot;&amp;amp;year=&amp;quot;+year)&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;end if&lt;br /&gt;end if&lt;br /&gt;&lt;br /&gt;Is this approach the adviced and correct one?</description></item></channel></rss>