Cannot GET / with gulp-connect-php Cannot GET / with gulp-connect-php php php

Cannot GET / with gulp-connect-php


What I understood from your question is that php serve is not recognizing .php files. There are 2 ways to get this work.

Apache (httpd.conf), search for DirectoryIndex and replace the line with this (will only work if you have dir_module enabled, but that's default on most installs) or add index.php

 DirectoryIndex index.php index.phtml index.html index.htm

orCreate a .htaccess file in your web root.Add the line...

DirectoryIndex index.php

Hope this helps!


You need to declare a index filename, add and index object to server.

...browserSync({    server: {        baseDir: "app",        index: "/index.php"    },});...

You could also set browserSync startpage to /index.php instead of /Edit I couldn't get startPath to work, so use index as in the example above.

...browserSync({    server: {        baseDir: "app"    },    startPath: "/index.php"});...

@pramod-patil I don't think Apache directions will help here, since browserSync doesn't use Apache for serving PHP.