Home > OS >  How to exclude the images directory in a redirect source in NextJS
How to exclude the images directory in a redirect source in NextJS

Time:05-17

I followed enter image description here enter image description here

CodePudding user response:

Does this work for your site?

source: '/:path((?!unsupported\.html$|images/).*)',

The key bit is dropping the $ anchor from after images, so it doesn't have to (not) match the actual image name

  • Related