Comments (4)
Hierarchy
- routes
- exact
- glob with extension
- glob
- clean url
- is directory, server index.html
- server static files
Need to load into route map:
- static file path (/somedir/index.html, 301 redirects to directory /somedir route)
- clean url file path (/somedir/index, 301 reidrects to directory /somedir route))
- directory served as index.html file path (/somedir servers /somedir/index.html)
from superstatic.
From Michael
- request comes in. if path matches exactly to a static file, and doesn't end in .html (or pretty urls are off) serve the file
- if pretty urls are on and the path matches exactly to a file with '.html', 301 redirect to the same path with '.html' dropped
- if pretty urls are on and the path matches to a file without '.html', serve up that file
- if path matches to a file after adding "/index.html" to it, serve the index file
- if any custom routes are declared, iterate through them and run a regex match against the path if a match, serve the file specified by the route
- 404 because we haven't found anything else
from superstatic.
priority is:
- exact file match
- custom route match
- index file match
- pretty url match
from superstatic.
path description: https://gist.github.com/mbleigh/0ea027bb2db04bfcc4ce
from superstatic.
Related Issues (20)
- superstatic CLI config file format not compatible with firebase
- wildcard redirects not working from 'firebase serve' HOT 13
- SuperStatic site gives DNS Error HOT 8
- Infinite redirect on trailingSlash: false and cleanUrls: false HOT 12
- Incorrect 404 when trailingSlashes: true and cleanUrls: false HOT 1
- Incompatibility with GCC <4.8 HOT 2
- Feature: Show directory listings HOT 2
- Is this project actively maintained? HOT 2
- Capture Segments in Rewrites HOT 1
- Wildcard in rewrite destinations? HOT 1
- Serving site landing page results in "Unexpected error occurred" for v6.0.x HOT 1
- Parse URL-encoded symbols in paths
- high severity vulnerability HOT 1
- No HTTP/2 support in Firebase hosting emulator
- Rewrite upstream request headers
- move to esm HOT 1
- Redirect inserting unexpected slash between index and parameters
- remove `nash`
- File provider: The argument 'path' must be a string or Uint8Array without null bytes.
- simplify compression configuration HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from superstatic.