- Edited
Hey Guys,
A client called me a week ago saying that their website is down ...
It's a PHP website hosted on an IIS server.
The problem was "The Service is unavailable" just black text on a white background.
I tried restoring files ... etc nothing worked.
After troubleshooting, it appeared that the problem is from the web.config file, it was a custom web.config file that i found from the internet which aims at omitting index.php from the URL
so instead of typing
www.blog.com/index.php/contactus
i write
www.blog.com/contactus
So when removing this web.config, the website loads but we need to add index.php before the end of the URL.
i have tried several versions of this web.config file which aims at rewriting URL's but the result was always "Service is Unavailable"
Any help would be appreciated.
PS: I am not a developer.
PS2: this is the rule i am using (which is failing)
A client called me a week ago saying that their website is down ...
It's a PHP website hosted on an IIS server.
The problem was "The Service is unavailable" just black text on a white background.
I tried restoring files ... etc nothing worked.
After troubleshooting, it appeared that the problem is from the web.config file, it was a custom web.config file that i found from the internet which aims at omitting index.php from the URL
so instead of typing
www.blog.com/index.php/contactus
i write
www.blog.com/contactus
So when removing this web.config, the website loads but we need to add index.php before the end of the URL.
i have tried several versions of this web.config file which aims at rewriting URL's but the result was always "Service is Unavailable"
Any help would be appreciated.
PS: I am not a developer.
PS2: this is the rule i am using (which is failing)
<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>