Learn how to redirect matching requests to other local routes or even to external URLs.
- [Tutor] Now that we know how to define flexible routes…and to access the route parameters,…there's one more technique, that we should cover.…In this movie, we will learn how to redirect requests.…On the web, when we're working with HTTP,…and we're working with web browsers,…the way that we redirect a browser to a new place…is always by sending a 302 status code…to the browser with the new URL.…That 302 status code tells the browser…that we are redirecting you to a new URL,…in other words, you won't find what you're looking for here,…instead, use this URL.…
And when the browser gets back that 302 status code…with the URL, it knows to automatically request the new URL.…It's kind of a ping pong process.…The browser sends its initial request,…the server sends back a redirect to the browser,…the browser automatically issues a new request…for that new URL.…It happens all the time, you may not even notice it.…If you've ever typed in one URL and then suddenly found…that the URL changed to be something different,…then you've been redirected.…
- Installing Sinatra
- Launching the server
- Defining routes
- Using route patterns and parameters
- Redirecting requests
- Rendering dynamic templates
- Using partial templates and layouts
- Defining custom helpers
Skill Level Intermediate
Ruby on Rails 5 Essential Trainingwith Kevin Skoglund10h 21m Beginner
3. Helpers and Filters
4. Useful Techniques
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.