File tree Expand file tree Collapse file tree 1 file changed +60
-2
lines changed Expand file tree Collapse file tree 1 file changed +60
-2
lines changed Original file line number Diff line number Diff line change @@ -186,13 +186,71 @@ We have a very easy-to-setup guide on [custom domains](/custom-domains#pgssh).
186
186
187
187
We support custom redirects via a special file ` _redirects ` .
188
188
189
- Read more about it at [ netflify] ( https://docs.netlify.com/routing/redirects ) .
189
+ ```
190
+ # Redirect browser request to what we serve
191
+ /home /
192
+ /blog/post.php /blog/post
193
+ /news /blog
194
+ /wow https://wow.com
195
+ /authors/c%C3%A9line /authors/about-c%C3%A9line
196
+ ```
197
+
198
+ ```
199
+ # Redirect with a 301
200
+ /home / 301
201
+
202
+ # Redirect with a 302
203
+ /my-redirect / 302
204
+
205
+ # Show a custom 404 for this path
206
+ /ecommerce /store-closed 404
207
+
208
+ # Rewrite a path
209
+ /pass-through /index.html 200
210
+ ```
190
211
191
212
# Custom Headers
192
213
193
214
We support custom headers via a special file ` _headers ` .
194
215
195
- Read more about it at [ netlify] ( https://docs.netlify.com/routing/headers ) .
216
+ ```
217
+ # a path:
218
+ /templates/index.html
219
+ # headers for that path:
220
+ X-Frame-Options: DENY
221
+ X-XSS-Protection: 1; mode=block
222
+ # another path:
223
+ /templates/index2.html
224
+ # headers for that path:
225
+ X-Frame-Options: SAMEORIGIN
226
+ ```
227
+
228
+ ```
229
+ /*
230
+ X-Frame-Options: DENY
231
+ X-XSS-Protection: 1; mode=block
232
+ ```
233
+
234
+ ## Denied Headers
235
+
236
+ These headers are ** not** allowed:
237
+
238
+ ```
239
+ Accept-Ranges
240
+ Age
241
+ Allow
242
+ Alt-Svc
243
+ Connection
244
+ Content-Encoding
245
+ Content-Length
246
+ Content-Range
247
+ Date
248
+ Location
249
+ Server
250
+ Trailer
251
+ Transfer-Encoding
252
+ Upgrade
253
+ ```
196
254
197
255
# Single-Page Applications
198
256
You can’t perform that action at this time.
0 commit comments