The server has two web applications, a Wordpress website and a stand-alone website in a subdirectory.
Both applications need rewriting for index.php, and for wordpress this was done automatically, but now I also need to rewrite for another application in a subdirectory.
For further clarification:
http://www.example.com/contact should be redirected to http://www.example.com/index.php/contact http://www.example.com/subfolder/contact should be redirected to http: // www .example.com / subfolder / index.php / contact
This seems to be a pretty simple thing, but I can't figure it out ...
This is the web.config that I have now, how can I fix it?
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <defaultDocument> <files> <clear/> <add value="index.php"/> <add value="Default.htm"/> <add value="Default.asp"/> <add value="index.htm"/> <add value="index.html"/> <add value="iisstart.htm"/> <add value="default.aspx"/> </files> </defaultDocument> <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="standalone" stopProcessing="true"> <match url="^" ignoreCase="false" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> </conditions> <action type="Rewrite" url="index.php/{R:1}" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
source share