一个在根目录index.php
define ( 'APP_NAME', 'WWW' );
define ( 'APP_PATH', './www/' );一个在CMS目录index.phpdefine('APP_NAME','CMS');
define('APP_PATH','./');根目录和CMS目录都存在一个.htaccess文件<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>跑WAMP都正常,现在部署到客户的LINUX上,妖孽的问题来了rewrite模块开启了,然后报错是
No input file specified.
网上找了一个解决策略是修改.htaccess文件,在index.php后多加一个问号
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>现在WWW的目录可以成功访问了,但是CMS的项目无法运作求教CMS目录下的.htaccess文件如何更正?
BTW:下午测试了很久,目前的配置下访问http://www.test.com/CMS/Index/login
系统无法识别Index模块,可以通过http://www.test.com/CMS/index.php/Index/login访问
补充:因为我的CMS中有EmptyAction类,发现http://www.test.com/CMS/Index/login会走进这个类,然后MODULE_NAME显示的是cms
最佳答案