Link to home
Start Free TrialLog in
Avatar of rivkamak
rivkamakFlag for United States of America

asked on

Redirecting 301 from asp to php in iis

Is there a simple rule I can add in IIS web.config file that any page that ends with .asp, should be redirected to the same name ending  .php
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

probably a URL Rewrite rule:

<rule name="Test 1" enabled="true">
                    <match url="([_0-9a-z-]+)/([_0-9a-z-]+).asp" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
                    <action type="Rewrite" url="{R:1}/{R:2}.php" />
                </rule>

Open in new window


in this case above, it will redirect domain.com/whatever/test.asp to domain.com/whatever/test.php
ASKER CERTIFIED SOLUTION
Avatar of NerdsOfTech
NerdsOfTech
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