Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 yii 构建 mu 第一个 Web 应用程序
据我了解,.htaccess 文件必须在项目文件夹中
在本地主机中,一切正常,但是当我上传整个项目时,我的远程服务器不接受 .htaccess 文件,并且找不到 404(服务器错误不是 yii 错误)
这个问题有替代方案吗?
提前谢谢了
使用 Front Controller 模式时别无选择。只有在 http 服务器上,您才能将所有想要的请求重定向到一个中心点。虽然您不能使用 .htaccess,但这很奇怪。
还有一个问题:您是使用 apache 还是其他东西作为 Web 服务器?因为据我所知 .htaccess 是特定于 apache 的,所以对于其他服务器,您需要在不同的其他地方进行不同的配置。