File: README.redirect

package info (click to toggle)
gatling 0.13-6
  • links: PTS
  • area: main
  • in suites: sid, stretch
  • size: 1,196 kB
  • ctags: 1,115
  • sloc: ansic: 23,805; makefile: 143; sh: 71; perl: 30
file content (32 lines) | stat: -rw-r--r-- 912 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
gatling can do HTTP redirects.

To do it, create a symlink like this:

  $ ln -s http://www.google.com/ search.html

Then, if someone tries to access search.html via HTTP, gatling will
detect the special broken symlink and send the user a HTTP redirect to
www.google.com.

To redirect an URL ending in /, create that directory and create a
symlink as above for index.html.



UPDATE: gatling can now also do fallback redirects.  If you have a farm
of mirrors, all replicating off a central one, you can tell gatling to
not generate 404s on the mirrors, but redirects.
SUPPORT_FALLBACK_REDIRECT must be #defined in gatling.c for this to be
compiled in.

If, for example, you run on your mirror machine

  gatling -r http://fallback.example.com

and someone requests

  http://mirror.example.com/notyetuploaded.html

gatling will generate a temporary redirect to

  http://fallback.example.com/notyetuploaded.html