admin 发表于 2014-6-29 12:53:13

嘉缘人才V2014版伪静态之nginx

nginx服务器环境下伪静态规则(系统默认规则)如下:rewrite ^/index.html$ /index.php last;
rewrite ^/(.*)/index.html$ /$1/index.php last;
rewrite ^/(.*)/c(+).html$ /co/company.php?id=$2 last;
rewrite ^/(.*)/ch(+).html$ /co/hire.php?id=$2 last;
rewrite ^/(.*)/chs(+).html$ /co/hires.php?id=$2 last;
rewrite ^/(.*)/cn(+).html$ /co/new.php?id=$2 last;
rewrite ^/(.*)/cns(+).html$ /co/news.php?id=$2 last;
rewrite ^/(.*)/cp(+).html$ /co/pic.php?id=$2 last;
rewrite ^/(.*)/cps(+).html$ /co/pics.php?id=$2 last;
rewrite ^/(.*)/cm(+).html$ /co/map.php?id=$2 last;
rewrite ^/(.*)/cc(+).html$ /co/comment.php?id=$2 last;
rewrite ^/(.*)/cg(+).html$ /co/guestbook.php?id=$2 last;
rewrite ^/(.*)/cct(+).html$ /co/contact.php?id=$2 last;

rewrite ^/(.*)/p(+).html$ /person/person.php?id=$2 last;
rewrite ^/(.*)/pr(+).html$ /person/resume.php?id=$2 last;
rewrite ^/(.*)/pp(+).html$ /person/pic.php?id=$2 last;
rewrite ^/(.*)/pc(+).html$ /person/comment.php?id=$2 last;
rewrite ^/(.*)/prl(+).html$ /person/resumelist.php?t=$2 last;


rewrite ^/(.*)/an(+).html$ /article/info.php?id=$2 last;
rewrite ^/(.*)/an(+)_(+).html$ /article/info.php?id=$2&page=$3 last;
rewrite ^/(.*)/al(+).html$ /article/list.php?id=$2 last;
rewrite ^/(.*)/al(+)_(+).html$ /article/list.php?id=$2&page=$3 last;

rewrite ^/(.*)/dl(+).html$ /down/list.php?id=$2 last;
rewrite ^/(.*)/dd(+).html$ /down/down.php?id=$2 last;

rewrite ^/(.*)/el(+).html$ /evalua/list.php?id=$2 last;
rewrite ^/(.*)/ei(+).html$ /evalua/info.php?id=$2 last;

rewrite ^/(.*)/smj(+).html$ /co/major.php?id=$2 last;
rewrite ^/(.*)/sms(+).html$ /co/majors.php?id=$2 last;
rewrite ^/(.*)/ss(+).html$ /co/student.php?id=$2 last;
rewrite ^/(.*)/sss(+).html$ /co/students.php?id=$2 last;
rewrite ^/(.*)/spr(+).html$ /co/professor.php?id=$2 last;
rewrite ^/(.*)/sps(+).html$ /co/professors.php?id=$2 last;
rewrite ^/(.*)/sr(+).html$ /co/require.php?id=$2 last;
rewrite ^/(.*)/srs(+).html$ /co/requires.php?id=$2 last;
rewrite ^/(.*)/ssl_(+).html$ /school/schoollist.php?page=$2 last;
rewrite ^/(.*)/spl_(+).html$ /school/professorlist.php?page=$2 last;
rewrite ^/(.*)/srl_(+).html$ /school/requirelist.php?page=$2 last;
rewrite ^/(.*)/sstl_(+).html$ /school/studentlist.php?page=$2 last;
rewrite ^/(.*)/sml_(+).html$ /school/majorlist.php?page=$2 last;

rewrite ^/(.*)/tce(+).html$ /co/course.php?id=$2 last;
rewrite ^/(.*)/tcs(+).html$ /co/courses.php?id=$2 last;
rewrite ^/(.*)/tt(+).html$ /co/trainer.php?id=$2 last;
rewrite ^/(.*)/tts(+).html$ /co/trainers.php?id=$2 last;
rewrite ^/(.*)/ti(+)_(+).html$ /co/info.php?t=$2&id=$3 last;
rewrite ^/(.*)/ttl_(+).html$ /train/trainlist.php?page=$2 last;
rewrite ^/(.*)/tcl_(+).html$ /train/courselist.php?page=$2 last;
rewrite ^/(.*)/ttrl_(+).html$ /train/trainerlist.php?page=$2 last;

rewrite ^/(.*)/hrlist.html$ /hr/list.php last;
rewrite ^/(.*)/hr(+).html$ /hr/hr.php?id=$2 last;
rewrite ^/(.*)/hsh(+).html$ /hr/seniorhire.php?id=$2 last;

rewrite ^/(.*)/hi(+)_(+).html$ /co/info.php?t=$2&id=$3 last;
rewrite ^/(.*)/hss(+).html$ /co/seniorhires.php?id=$2 last;
rewrite ^/(.*)/hs(+).html$ /co/seniorhire.php?id=$2 last;
rewrite ^/(.*)/hsl_(+).html$ /hunter/seniorhirelist.php?page=$2 last;
rewrite ^/(.*)/hhl_(+).html$ /hunter/hunterlist.php?page=$2 last;

rewrite ^/common/(+).html$ /common/$1.php?$2 last;
rewrite ^/common/(+)(+).html$ /common/$1.php?id=$2 last;

rewrite ^/(.*)/vvh(+).html$ /vhire/vhire.php?id=$2 last;
rewrite ^/(.*)/vvr(+).html$ /vhire/vresume.php?id=$2 last;
rewrite ^/(.*)/vvhl_(+).html$ /vhire/vhirelist.php?page=$2 last;
rewrite ^/(.*)/vvrl_(+).html$ /vhire/vresumelist.php?page=$2 last;

rewrite ^/(.*)/zi(+).html$ /zph/info.php?zid=$2 last;


wuhuwz 发表于 2014-6-29 21:49:46

这个应该是我们服务器用的吧

admin 发表于 2014-6-30 09:36:11

wuhuwz 发表于 2014-6-29 13:49
这个应该是我们服务器用的吧

是在服务器上用的
页: [1]
查看完整版本: 嘉缘人才V2014版伪静态之nginx