Avatar of Craig Lambie
Craig Lambie
Flag for Australia

asked on 

Rewrite .HtAccess rewrite to IIS challenge

Hi Experts,

I have a challenge for you... I need to convert the follow .htaccess rewrite rules to work on an IIS Server.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule file/.* s3url.php [NC,L]

Can you help?
I am thinking something like
				<rule name="wordpress" patternSyntax="Wildcard">
					<match url="*" />
							<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
							<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
					<action type="Rewrite" url="index.php" />
                <rule name="Imported Rule 1" stopProcessing="true">
                    <match url="file/.*" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                    <action type="Rewrite" url="s3url.php" />

Open in new window

But that doesn't work.

Microsoft IIS Web ServerApache Web ServerLinux Networking

Avatar of undefined
Last Comment
Craig Lambie

8/22/2022 - Mon