opennet
V2EX  ›  Apache

请教Apache Rewrite中带参数的规则写法

  •  
  •   opennet · Sep 19, 2012 · 3543 views
    This topic created in 5020 days ago, the information mentioned may be changed or developed.
    例子:
    www.abc.com/news.php
    www.abc.com/news.php?bid=1
    www.abc.com/news.php?bid=1&page=1
    www.abc.com/news.php?bid=1&cid=1&page=1
    上面的url都可以正常打开页面,现在是Rewrite的时候一条URL对应一条规则,我想请教的是:
    1、可以写一条规则就能适用上面四个URL吗?
    2、通过www.abc.com/news.htm可以打开页面,怎么能让www.abc.com/news.php显示无法找到页面?
    2 replies    1970-01-01 08:00:00 +08:00
    twm
        1
    twm  
       Sep 19, 2012
    完全可以,手机打字累啊
    opennet
        2
    opennet  
    OP
       Sep 19, 2012
    @twm 有空的话能帮写一条吗?谢谢!
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2720 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 03:03 · PVG 11:03 · LAX 20:03 · JFK 23:03
    ♥ Do have faith in what you're doing.