V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
jige
V2EX  ›  程序员

求助求助 nginx 伪静态规则转换成 apache 我搞不定了。 大神们帮帮忙 下边是代码

  •  
  •   jige · 2019-04-15 15:46:28 +08:00 · 900 次点击
    这是一个创建于 1838 天前的主题,其中的信息可能已经有所发展或是发生改变。
    location / {
    rewrite ^/(/)?$ /web/index.php?c=account&a=welcome;
    rewrite /([a-z]+).html /web/index.php?c=account&a=welcome&do=$1;
    rewrite /([a-z]+)/id/(\d+).html /web/index.php?c=account&a=welcome&do=$1&id=$2;
    }
    1 条回复    2019-04-15 15:59:28 +08:00
    FreshUncle
        1
    FreshUncle  
       2019-04-15 15:59:28 +08:00
    ##rewrite apache create tool.apizl.com

    RewriteRule '^/(/)?$$' /web/index.php?c=account&a=welcome;
    [L]
    RewriteRule '/([a-z]+).html$' /web/index.php?c=account&a=welcome&do=$1;
    [L]
    RewriteRule '/([a-z]+)/id/(\d+).html$' /web/index.php?c=account&a=welcome&do=$1&id=$2;
    [L]
    参考网站 http://tool.apizl.com/tools/rewriteTools.html
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5370 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 09:10 · PVG 17:10 · LAX 02:10 · JFK 05:10
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.