Lord Black Lord Black - 4 months ago 23x
PHP Question

Execute Php on web root of Azure Web App

I'm trying out Azure Web apps but I've developing websites and other web apps on "normal" servers that run Linux (OK whatever hosting you get when you buy a domain) What happens is if there is an index.php in the root folder it gets executed without the need for adding the name of the php file in the url, basically www.example.com will be the same* as www.example.com/index.php. I want that in azure websites, currently I have to keep adding the php file name in the url to get anywhere which is not feasible for all scenarios, if I don't I get "You do not have permission to view this directory or page." I've run out of ideas to make that possible, some help would be nice...


In web.config define index.php as the first file to be processed by the server

                <clear />
                <rule name="Kanboard-nice-urls" stopProcessing="true">
                    <match url="^" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                    <action type="Rewrite" url="index.php" appendQueryString="true" />