Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Web.config file to allow one to host their uhsahidi installation o... #1190

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

tawandakembo
Copy link

...n Windows servers running under IIS

This change will allow you to host your ushahidi installation on
Windows Azure. This was not possible before and you could not host your
ushahidi installation on a Windows web server running IIS as the web
server because the .htaccess file only works on Apache and will not work
under IIS.
IIS howver will only parse the rewrite rules in a Web.config file.
Here I have put all the rewrite rules in the web.config file so that I
can be able to host my Ushahidi installation on Windows Azure.

…n on Windows servers running under IIS

This change will allow you to host your ushahidi installation on
Windows Azure. This was not possible before and you could not host your
ushahidi installation on a Windows web server running IIS as the web
server because the .htaccess file only works on Apache and will not work
under IIS.
IIS howver will only parse the rewrite rules in a Web.config file.
Here I have put all the rewrite rules in the web.config file so that I
can be able to host my Ushahidi installation on Windows Azure.
<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="/-" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this do?
Would it be better to use something like <action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" /> ?

@simplyraul
Copy link

here's something that worked for me...

                <rule name="Rule 1" stopProcessing="true">
                    <match url="^(application|modules|system)/" ignoreCase="false" />
                    <action type="CustomResponse" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
                </rule>
                <rule name="Rule 2" stopProcessing="true">
                    <match url="^(.+)$" ignoreCase="false" />
                    <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="index.php?kohana_uri={R:1}" appendQueryString="true" />
                </rule>

hope this helps...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants