Link to home
Start Free TrialLog in
Avatar of EndeavorToPersevere
EndeavorToPersevereFlag for United States of America

asked on

Is a 302 or 301 redirect better for this IIS rule?

Following this article: Redirecting ASP.NET Legacy URLs to Extensionless with the IIS Rewrite Module

I added these rules but I'm not sure whether it is better for SEO to have the first rule do a "Permanent" (301) or a "Found" (302)

            <rules>
                <rule name="extensionless" stopProcessing="true">
                    <match url="(.*)\.aspx$" />
                    <action type="Redirect" url="{R:1}" redirectType="Found" />
                </rule>
				<rule name="removeextension" enabled="true">
					<match url=".*" negate="false" />
						<conditions>
							<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
							<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
							<add input="{URL}" pattern="(.*)\.(.*)" negate="true" />
						</conditions>
						<action type="Rewrite" url="{R:0}.aspx" />
				</rule>				
            </rules>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of EndeavorToPersevere

ASKER

Thanks!