Codeigniter 2: The requested URL was not found on this server (404) error. CI isn't routing the right way

冷暖自知 提交于 2019-12-02 04:11:55

The leading slash could be causing your problem.

Change

RewriteRule ^(.*)$ /index.php/$1 [L]

to

RewriteRule ^(.*)$ index.php [L]

try this...its Working for me

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

edite your .htaccess file to>

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
</IfModule>

Change the rewrite rule to

RewriteRule ^(.*)$ /YOUR_CI_PROJECT_NAME/index.php/$1 [L]
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!