无法在没有index.php的情况下运行URL

时间:2016-05-24 07:35:25

标签: .htaccess codeigniter drupal-7

在我的 drupal 项目www.example.com中我有 codeigniter 项目文件夹,该文件夹在 index.php 时没有运行>网址。 请建议任何解决方案

2 个答案:

答案 0 :(得分:0)

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond $1 !^(index\.php|resources|robots\.txt)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L,QSA] 

</IfModule> 

答案 1 :(得分:0)

在codeigniter中,URL重写对于服务器会有所不同。对于linux,您应该使用.htaccess文件,对于Windows,您应该使用web.config文件。你可以通过谷歌获取这些文件。

相关问题