【发布时间】:2012-09-06 18:58:05
【问题描述】:
我正在尝试将请求从我的 url 的根目录传递到子文件夹,而不使用 mod_rewrite 进行重定向。 (注意:我在 Rackspace 云站点上执行此操作。)
我把 CI .htaccess 移到了根文件夹,然后改了:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|public|robots\.txt)
RewriteRule ^(.*)$ /ci/index.php/$1 [L]
到这里:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|public|robots\.txt)
RewriteBase /ci/
RewriteRule ^(.*)$ /ci/index.php/$1 [L]
这给了我一个内部服务器错误。我不相信这种类型有错误日志,这可能是我一直认为 mod_rewrite 是炼金术的原因。
也许你能看出哪里出了问题?
谢谢!
【问题讨论】:
-
htaccess 文件在哪里?在
/ci/目录中?
标签: php apache .htaccess codeigniter mod-rewrite