<?xml version="1.0" encoding="UTF-8"?>
<!-- vBulletin 4 : IIS7 Rules -->
<configuration>
	<system.webServer>
		<directoryBrowse enabled="true" />
		<rewrite>
			<rules>
				<!-- Threads -->
				<rule name="vB Threads" enabled="true" stopProcessing="true">
					<match url="^threads/.*" ignoreCase="true" />
					<conditions logicalGrouping="MatchAll">
						<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="true" negate="true" />
						<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="true" negate="true" />
					</conditions>
					<action type="Rewrite" url="showthread.php" appendQueryString="true" />
				</rule>

				<!-- Forums -->
				<rule name="vB Forums" enabled="true" stopProcessing="true">
					<match url="^forums/.*" ignoreCase="true" />
					<conditions logicalGrouping="MatchAll">
						<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="true" negate="true" />
						<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="true" negate="true" />
					</conditions>
					<action type="Rewrite" url="forumdisplay.php" appendQueryString="true" />
				</rule>

				<!-- Members -->
				<rule name="vB Members" enabled="true" stopProcessing="true">
					<match url="^members/.*" ignoreCase="true" />
					<conditions logicalGrouping="MatchAll">
						<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="true" negate="true" />
						<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="true" negate="true" />
					</conditions>
					<action type="Rewrite" url="member.php" appendQueryString="true" />
				</rule>

				<!-- Blogs -->
				<rule name="vB Blogs" enabled="true" stopProcessing="true">
					<match url="^blogs/.*" ignoreCase="true" />
					<conditions logicalGrouping="MatchAll">
						<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="true" negate="true" />
						<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="true" negate="true" />
					</conditions>
					<action type="Rewrite" url="blog.php" appendQueryString="true" />
				</rule>

				<!-- Blog Entries -->
				<rule name="vB Entries" enabled="true" stopProcessing="true">
					<match url="^entries/.*" ignoreCase="true" />
					<conditions logicalGrouping="MatchAll">
						<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="true" negate="true" />
						<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="true" negate="true" />
					</conditions>
					<action type="Rewrite" url="entry.php" appendQueryString="true" />
				</rule>

				<!-- CMS Rewrite-->
				<rule name="vB CMS" enabled="true" stopProcessing="false">
					<match url="^(?:(.*?)(?:/|$))(.*|$)$" ignoreCase="true" />
					<conditions logicalGrouping="MatchAll">
						<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="true" negate="true" />
						<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="true" negate="true" />
					</conditions>
					<action type="Rewrite" url="{R:1}.php?r={R:2}" appendQueryString="true" />
				</rule>

				<!-- Final Check -->
				<rule name="vB Final" enabled="true" stopProcessing="true">
					<match url="^(.*)$" ignoreCase="true" />
					<conditions logicalGrouping="MatchAll">
						<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="true" negate="true" />
					</conditions>
					<action type="CustomResponse" statusCode="404" statusReason="Not Found" appendQueryString="false" />
				</rule>
			</rules>
		</rewrite>
	</system.webServer>
</configuration>
