带有 quercus 的 codeigniter 显示 404 错误
codeigniter with quercus shows 404 error
我正尝试在 tomcat 上使用 quercus 运行 codeigniter。
我在 webapps/ROOT 中安装了 quercus,然后在 webapps/ROOT/appname 中安装了 codeigniter。
我可以访问 webapps/ROOT/appname 中的 index.php,但是如果我尝试访问 ROOT/appname/index.php/login/login,则会出现 404 错误。我什至无法访问 ROOT/appname/welcome.
如何解决这个 404 错误?
我正在使用 codeigniter 2.x。
我用 urlrewriterfilter 代替了 htaccess。但它似乎不起作用。
以下是我的 urlrewrite.xml.
<urlrewrite>
<rule>
<name>Generic Pretty URLs Pass-through</name>
<condition type="request-uri" operator="notequal">^/(robots.txt|osd.xml|flex2gateway|cfide|cfformgateway|railo-context|admin-context|files|images|jrunscripts|javascripts|miscellaneous|stylesheets)</condition>
<condition type="request-uri" operator="notequal">\.(bmp|gif|jpe?g|png|css|js|txt|xls|ico|swf|woff|ttf|otf)$</condition>
<condition type="request-filename" operator="notdir"/>
<condition type="request-filename" operator="notfile"/>
<from>(.*)</from>
<to type="passthrough" last="true">index.php/</to>
</rule>
</urlrewrite>
我找到了答案。我不太确定它是否与 URL 路线有关。但解决方案是输入'?'在 index.php 之后。长话短说,我只是喜欢以下内容:
/appname/index.php?/login/login
那就成功了!
我正尝试在 tomcat 上使用 quercus 运行 codeigniter。
我在 webapps/ROOT 中安装了 quercus,然后在 webapps/ROOT/appname 中安装了 codeigniter。
我可以访问 webapps/ROOT/appname 中的 index.php,但是如果我尝试访问 ROOT/appname/index.php/login/login,则会出现 404 错误。我什至无法访问 ROOT/appname/welcome.
如何解决这个 404 错误?
我正在使用 codeigniter 2.x。
我用 urlrewriterfilter 代替了 htaccess。但它似乎不起作用。 以下是我的 urlrewrite.xml.
<urlrewrite>
<rule>
<name>Generic Pretty URLs Pass-through</name>
<condition type="request-uri" operator="notequal">^/(robots.txt|osd.xml|flex2gateway|cfide|cfformgateway|railo-context|admin-context|files|images|jrunscripts|javascripts|miscellaneous|stylesheets)</condition>
<condition type="request-uri" operator="notequal">\.(bmp|gif|jpe?g|png|css|js|txt|xls|ico|swf|woff|ttf|otf)$</condition>
<condition type="request-filename" operator="notdir"/>
<condition type="request-filename" operator="notfile"/>
<from>(.*)</from>
<to type="passthrough" last="true">index.php/</to>
</rule>
</urlrewrite>
我找到了答案。我不太确定它是否与 URL 路线有关。但解决方案是输入'?'在 index.php 之后。长话短说,我只是喜欢以下内容: /appname/index.php?/login/login
那就成功了!