1

I have a Gulp site with BrowserSync and the following structure:

.
├── README.md
├── gulpfile.js
...
├── app/
│   ├── index.html
│   ├── example.html
│   ├── tools.html
│   └── tools/
└── dist/

When I try to access the tools page via http://localhost:3000/tools, a 301 redirection is returned, redirecting me to http://localhost:3000/tools/.

The http://localhost:3000/example page works perfectly, this issue only happens when a folder with the same name is present.

Here is the content of my Gulpfile:

// Starts browserSync

gulp.task('serve', function(done){
  browserSync({
    server: {
      baseDir: './dist',
      index: "index.html",
      serveStaticOptions: {
        extensions: ['html']
      }
    }
  });
  done();
});

Note that http://localhost:3000/tools.html works, but I do not want to use the extension. How can I access the /tools page without being redirected?

mincom
  • 670
  • 5
  • 21

0 Answers0