我的CodeIgniter项目没有在WAMP服务器上运行

Mah*_*dra 3 php mysql codeigniter-2

我在CodeIgniter中开发了我的项目,它在XAMPP服务器上运行良好,但在WAMP服务器上运行不正常.

我改变了

$config['index_page'] = 'index.php'; to $config['index_page'] = '';
Run Code Online (Sandbox Code Playgroud)

和.htaccess我

RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
Run Code Online (Sandbox Code Playgroud)

网站主页正确显示.但是,每当我点击任何链接时,没有链接正在运行服务器主页出现在法语版本中.

只有在URL中有index.php时,项目才能在WAMP上正常运行.

例如

http://localhost/codeigniter/welcome/view (This link doesn't work)
http://localhost/codeigniter/index.php/welcome/view (Links works properly)
Run Code Online (Sandbox Code Playgroud)

Sté*_*eix 5

尝试这个,它在任何地方工作:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php/$1 [L]
Run Code Online (Sandbox Code Playgroud)