V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
atie
V2EX  ›  Linux

有人会重写url规则吗?nginx的~~discuz程序。

  •  
  •   atie · Apr 16, 2013 · 3621 views
    This topic created in 4765 days ago, the information mentioned may be changed or developed.
    disucz默认的规则是
    http://www.xxx.com/forum-57-1.html
    改成http://www.xxx.com/forum/57/1/

    http://www.xxx.com/thread-142469-1-1.html
    改成http://www.xxx.com/thread/142469/1/1.html

    在nginx下,disucz程序,有人会改吗?
    3 replies    1970-01-01 08:00:00 +08:00
    feiandxs
        1
    feiandxs  
       Apr 16, 2013
    rewrite ^([^\.]*)/forum-(\w+)-([0-9]+)\.html$ $1/forum.php?mod=forumdisplay&fid=$2&page=$3 last;
    rewrite ^([^\.]*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$ $1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3 last;

    原始规则。

    - to /
    MrTwo
        2
    MrTwo  
       Apr 16, 2013
    discuz的伪静态要更改,好像不仅仅要改.htaccess的规则,也要改某个Php文件的配置。
    aisin
        3
    aisin  
       Apr 16, 2013
    我的vps当初也是不会整nginx的伪静态, 所以干脆在vps搭建了apache环境, 这样写htaccess就简单些了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2707 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 13:13 · PVG 21:13 · LAX 06:13 · JFK 09:13
    ♥ Do have faith in what you're doing.