试图从不使用post的代码点火器中删除index.php

时间:2012-10-20 11:39:47

标签: php codeigniter

重写规则工作正常,除了我发布任何表单时 - 数据发布到的url是domain / index.php / index.php / controller / method。

有什么想法吗?已经尝试过可能会在这里做出回应。

HT Access:

    # rewrite rules
    RewriteEngine On

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

1 个答案:

答案 0 :(得分:3)

你可以从$ config ['index_page'] ='index.php'中删除index.php; config.php文件中找到的变量。完整路径应用程序/ config / config.php。

替换

$config['index_page'] = 'index.php';

来自

$config['index_page'] = '';

希望它对你有用。

相关问题