troubleshooting Question

Rewrite .HtAccess rewrite to IIS challenge

Avatar of Craig Lambie
Craig LambieFlag for Australia asked on
Microsoft IIS Web ServerApache Web ServerLinux Networking
9 Comments1 Solution820 ViewsLast Modified:
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
 
<rewrite>
      <rules>
				<rule name="wordpress" patternSyntax="Wildcard">
					<match url="*" />
						<conditions>
							<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
							<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
						</conditions>
					<action type="Rewrite" url="index.php" />
				</rule>
                <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" />
                    </conditions>
                    <action type="Rewrite" url="s3url.php" />
                </rule></rules>
    </rewrite>

Open in new window

But that doesn't work.

Thoughts?
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 9 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros