【问题标题】:codeigniter : how to set htacces file in rackspacecodeigniter:如何在 rackspace 中设置 htaccess 文件
【发布时间】:2011-02-20 14:37:17
【问题描述】:

我在 rackspace 服务器上托管我的网站,我使用 codeigniter,我必须从 url 中删除 index.php,我使用了我在其他共享托管服务器中使用的 .htaccess 文件,但它现在可以工作我的文件位于 /var /www/html/ 我的 htaccess 文件是

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$index.php/$1 [L]

它在本地服务器(也可以在其他共享托管服务器中)工作正常

我该如何解决这个问题?

非常感谢

【问题讨论】:

  • 发生了什么或没有发生什么?

标签: php apache codeigniter rackspace


【解决方案1】:

确保您已安装 mod_rewirte

sudo a2enmod rewrite

确保 .htaccess 文件可被 www-data 或任何用户 apache 运行时读取

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-02-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多