【问题标题】:Codeigniter wont redirect in netbeansCodeigniter 不会在 netbeans 中重定向
【发布时间】:2012-11-23 05:47:33
【问题描述】:

我有这个网址:

http://localhost:85/WebCamClone/Home

但它只会像这样加载:

http://localhost:85/WebCamClone/index.php/Home

我尝试将 htaccess 规则设置为这样:

  RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L] 

但它没有工作。我还应该尝试什么?

这是我的 apache 配置文件中的内容:

    <Directory />
    Options FollowSymLinks
    AllowOverride all
    Order deny,allow
    Deny from all
</Directory>

【问题讨论】:

    标签: apache codeigniter url-rewriting


    【解决方案1】:

    application/config/config.php 中,您是否从$config['index_page'] 中删除了index.php,使其看起来像:

    $config['index_page'] = '';
    

    【讨论】:

    • yeah..see update..我认为这与apache权限有关
    【解决方案2】:

    在您的 .htaccess 文件中尝试使用此代码一次

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php/$1 [L] 
    

    【讨论】:

      【解决方案3】:

      问题出在 apaches 配置文件中。我必须转到它的文件并替换 allowoveride none 以允许覆盖所有

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2015-11-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-08-17
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多