.htaccess CodIgner无法删除远程服务器上的index.php
我用的是codeigniter。我成功地删除了localhost上的index.php,但它在远程服务器上不起作用 当我尝试调用时:它会给我[File not found]。但当我打字时,它会起作用: 我将所有文件放在www文件夹中,这是我的.htaccess:.htaccess CodIgner无法删除远程服务器上的index.php,.htaccess,codeigniter,.htaccess,Codeigniter,我用的是codeigniter。我成功地删除了localhost上的index.php,但它在远程服务器上不起作用 当我尝试调用时:它会给我[File not found]。但当我打字时,它会起作用: 我将所有文件放在www文件夹中,这是我的.htaccess: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [PT,L]
谁能帮我一下吗?
谢谢。这是我使用的.htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
重新启动发动机
重写基/
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/index.php[L]
您是否已检查远程服务器上的.htaccess文件是否正确,并且正在读取该文件?这对我很有用:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
在您的config.php中:
$config['uri_protocol'] = 'AUTO';
这将从本地主机和远程服务器中删除index.php