mrjurin's avatar

lumen group routing not working in web app azure.

Hi,

i have installed lumen on app service on azure. this one

$router->get('/',['middleware'=>[],function(){
    $users = DB::select('SELECT * FROM famadb.authtools_user');
    return response()->json($users);
}]); 

work like charm. but when it comes to group routing like :

$router->group(['prefix'=>'/household'],function($router){
    $router->get('/',function(){
        return response()->json('hello household');
    });
});

azure server will response with message :

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable..

as for information, i already try the rewrite using web.config like

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <!-- Quitar los slash '/' del final de la ruta -->
        <rule name="RewriteRequestsToPublic">
          <match url="^(.*)$" />
          <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
          </conditions>
          <action type="Rewrite" url="/public/{R:0}" />
        </rule>

        <!-- Si el archivo o carpeta solicitado no existe, se realiza la petición a través de index.php -->
        <rule name="Imported Rule 1" stopProcessing="true">
          <match url="^(.*)$" ignoreCase="false" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
          </conditions>
          <action type="Rewrite" url="/index.php/{R:1}" appendQueryString="true" />
        </rule>
      </rules>
    </rewrite>
  </system.webServer>
</configuration>

but only work for non group.

do you guys have any idea?

0 likes
0 replies

Please or to participate in this conversation.