Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Server \ Varnish achieve page jump     - Linux process group, session daemon (Linux)

- Phoenix agents use P2P WebRTC development (Programming)

- Django Signals from practice to source code analysis (Programming)

- Linux at command (Linux)

- Realization of Linux operating system illegal IP censorship (Linux)

- Ubuntu 14.04 LTS 64-bit installation and activation Sublime Text 3 can not solve the Chinese input method to solve the problem (Linux)

- CentOS installation pycurl (Linux)

- Python dictionary applications get built-in method (Programming)

- Memcached source installation and configuration under CentOS 6.6 (Server)

- DRBD daily management (Server)

- Linux Routine Task Scheduler (Linux)

- Easy to install CentOS 6.6 desktop environment (Linux)

- Depth understanding of DB2 table space (Tablespace) (Database)

- Linux basic introductory tutorial ---- regex basis (Linux)

- Some of the bibliographic management tools to good use on linux (Linux)

- SecureCRT remote connection Ubuntu fails to solve the case (Linux)

- How comprehensive resist attacks from the network (Linux)

- LVM management reduces swap partition space to the root partition (Linux)

- JavaScript common functions summary (Programming)

- Java, boolean operators & =, | = ^ = use (Programming)

  Varnish achieve page jump
  Add Date : 2017-08-31      
  Ngxin implement user-agent to access the page without very simple, but we usually tip the cache layer, the layer of how to achieve in the cache, the same principles.

Today, with Varnish realize, notice that we realize that 302 redirect instead rewrite url

Goals: iphone to access www.abc.com will automatically jump to m.abc.com

Paste the code

sub vcl_recv {
   if (req.http.user-agent ~ "iphone") {
       if (req.http.host ~ "www.abc.com") {
           error 750 "m.abc.com";
sub vcl_error {
  if (obj.status == 750) {
     if (obj.response ~ "m.abc.com") {
         set obj.http.Location = "http://m.abc.com/";
     set obj.status = 302;
         return (deliver);
- Install DB2 V10 and Data Studio V3 under Linux (Ubuntu) environment (Database)
- Android webView URL redirects affect goBack () (Programming)
- The array of C language (Programming)
- Java Foundation - The relationship between abstract classes and interfaces (Programming)
- Linux kernel socket protocol stack routing lookup cache mechanism (Linux)
- Processor in protected mode of protection (Linux)
- Why HBase need to build SQL engine layer (Database)
- JavaScript, some conclusions about the implicit conversion (Programming)
- Java enum use (Programming)
- Java coding conventions (Programming)
- Linux System Getting Started Learning: Using the Linux command line detected DVD burner name and write speeds (Linux)
- Build your own Web server under Ubuntu Linux system (Server)
- Bad name two variables (Linux)
- A well-known but rarely used skills: object pool (Programming)
- Linux System Tutorial: How to Check MariaDB server versions (Database)
- MySQL uses mysqld_multi to deploy stand-alone multi-instance detail procedures (Database)
- Linux, set and view environment variables (Linux)
- Parse Server supports iOS and Android push messaging (Programming)
- Timing task Crontab under Linux system (Linux)
- Oracle Client Easy Connection error ORA-12154, TNS-03505 (Database)
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.