【发布时间】:2018-11-05 03:15:47
【问题描述】:
我在我的服务器上通过以下 URL 设置了 CodeIgniter 应用程序:
http://subdomain.domainame.com/something1/something2/
(我以something1和something 2为例)
现在,我可以在使用上述 URL 时完美访问应用程序,并且可以在末尾添加 /index.php/controller/action 等。
我尝试在托管应用程序的同一目录中设置一个 .htaccess 文件,但它似乎不起作用。
.htaccess 文件包含以下内容:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ something1/something2/index.php?/$1 [L]
这给了我一个 500 内部服务器错误。
任何人都可以对此有所了解吗?
【问题讨论】:
标签: php apache .htaccess codeigniter mod-rewrite