homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
Forum Library, Charter, Moderators: ocean10000

Microsoft IIS Web Server and ASP.NET Forum

IIS and httpd.ini
IIS using httpd.ini to handle multiple domains on server

5+ Year Member

Msg#: 4429353 posted 4:27 am on Mar 15, 2012 (gmt 0)


I am using the following for my shared hosting:

Platform Type: Windows 2003 Server Enterprise
IIS Version: 6.0
PHP Version: 5.2.5

The resource has a httpd.ini file located in the root directory. I have multiple domains and each domain has the following rules:


### subdomain redirect v2 ###
RewriteCond Host: (?:.+\.)?dev\.example\.com
RewriteCond URL ^/example.com/(.*)
RewriteCond METHOD GET
RewriteRule ^/example.com/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?dev\.example\.com
RewriteRule ^/example.com/(.*) /$1 [I]
RewriteCond Host: (?:.+\.)?dev\.example\.com
RewriteRule (.*) /example.com/$1 [I,L]

I am trying to understand why all requests to a subfolder always perform a 302 redirect, appending a trailing slash.

Subdirectory WITHOUT trailing slash
redirects to

When I navigate to the domain itself, it does not append a trailing slash:

Root Domain WITHOUT trailing slash
does NOT redirect to

Instead the trailing slash is REMOVED when navigating to the domain with the trailing slash appended:

Root Domain WITH trailing slash
redirects to

When I observe the headers I see the following:

HTTP/1.1 302 Object moved
Server: Microsoft-IIS/6.0

My resource is located within my hosting account at the following path from the root:


My main questions are as follows:

1) Could someone explain the ISAPI Rewrite rule above in simple terms?

2) Is the above ISAPI rule responsible for appending/removing the trailing slash as outlined above?

3) I have hosted in multiple environments, but the above behaviour appears isolated to the server environment I am currently hosted on. Is there any way I can prevent the trailing slash from being appended?

Please note the purpose is to ensure no redirects occur when I request a resource that does not end in a trailing slash for SEO.

Thanks in advance.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Microsoft / Microsoft IIS Web Server and ASP.NET
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved