Mod rewrite Apache快速cgi mod_重写:无输入文件

Mod rewrite Apache快速cgi mod_重写:无输入文件,mod-rewrite,Mod Rewrite,/index/to/index.php /index/hello to/index.php/hello 该站点为“使用路径\信息”,默认规则不起作用: RewriteRule ^([^/]+)/(.*)$ $1.php/$2 [L] 我改为: RewriteRule ^([^/.]+)((/[^/]+)*)/?$ $1.php$2 [L] 真奇怪 */index/to/index.php工作正常 /index/hello to/index.php/hello不工作 并且它

/index/to/index.php

  • /index/hello to/index.php/hello

  • 该站点为“使用路径\信息”,默认规则不起作用:

    RewriteRule ^([^/]+)/(.*)$      $1.php/$2   [L]
    
    我改为:

    RewriteRule ^([^/.]+)((/[^/]+)*)/?$ $1.php$2 [L]
    
    真奇怪

    • */index/to/index.php工作正常

    • /index/hello to/index.php/hello不工作

    并且它说没有指定输入文件。


    Php在Apache中以快速cgi模式运行。

    路径信息在每台服务器以及Web服务器和Php的组合上都不同。为什么不使用GET变量进行路由呢

    RewriteRule ^([^/.]+)((/[^/]+)*)/?$ routing.php/?site=$1&module=$2 [L]
    

    谢谢,我通过使用一个路由php文件来完成它