简体   繁体   English

codeigniter在此服务器上找不到请求的URL /用户

[英]codeigniter The requested URL /User was not found on this server

i Have codeigniter 3.0.1 installed in ubuntu 14.04 apache 2.4.7, it was run normally in windows with wamp server but when i move it to the ubuntu server it keep getting that error,the rewrite module already enabled and this is my .htaccess file: 我在ubuntu 14.04 apache 2.4.7中安装了codeigniter 3.0.1,它在带有wamp服务器的Windows中正常运行,但是当我将其移至ubuntu服务器时,它不断出现该错误,重写模块已启用,这是我的.htaccess文件:

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

and this is the configuration of config.php 这是config.php的配置

$config['base_url'] = 'http://assets1.uofk.edu';
$config['index_page'] = 'index.php';
$config['uri_protocol'] = 'AUTO';

this is routes.php configuration: 这是routes.php配置:

$route['default_controller'] = 'User';
$route['404_override'] = '';
$route['translate_uri_dashes'] = FALSE;

Also i considered the ubuntu case sensitive matter of naming model but still getting not found error..please help 我也考虑了命名模型的ubuntu区分大小写的问题,但仍然找不到错误..请帮助

try check your .htaccess change 尝试检查您的.htaccess更改

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

and check your config.php 并检查您的config.php

$config['base_url'] = 'http://assets1.uofk.edu/';
$config['index_page'] = '';

and check your controller name must be User.php and on your class must User 并检查您的控制器名称必须为User.php,并且在您的类中必须为User

Use this .htaccess 使用此.htaccess

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^(.*)$ index.php?x=$1 [QSA,NC,L]


RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^(.*)$ index.php [QSA,NC,L]

RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME} -s
RewriteRule ^(.*)$ index.php [QSA,NC,L] 

RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME} -s
RewriteRule ^(.*)$ index.php/$1 [QSA,NC,L]  

and this is the configuration of config.php 这是config.php的配置

$config['base_url'] = 'YOUR_URL';
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';

.htaccess RewriteRule Examples https://www.brontobytes.com/knowledgebase/149/htaccess-RewriteRule-Examples.html .htaccess RewriteRule示例https://www.brontobytes.com/knowledgebase/149/htaccess-RewriteRule-Examples.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Codeigniter:在服务器中找不到请求的URL - Codeigniter: The requested URL was not found in the server CodeIgniter,在服务器上找不到请求的 URL - CodeIgniter, Requested URL not found on server Codeigniter-在此服务器上找不到请求的URL - Codeigniter - the requested URL was not found on this server Codeigniter 在此服务器上找不到请求的 URL - Codeigniter The requested URL was not found on this server 在此服务器上找不到请求的URL /〜paul / CodeIgniter / api / example / user / - The requested URL /~paul/CodeIgniter/api/example/user/ was not found on this server xampp上的Codeigniter错误:在此服务器上找不到请求的URL - Codeigniter on xampp error: The requested URL was not found on this server 在此服务器上找不到请求的URL。 在PHP codeigniter上 - The requested URL was not found on this server. on php codeigniter 为什么 codeIgniter 显示在此服务器上未找到请求的 URL? - Why codeIgniter show the requested URL was not found on this server? 找不到CodeIgniter / ion_auth 404“在此服务器上找不到请求的URL / ci / admin / user / login /。” - CodeIgniter/ion_auth 404 Not Found “The requested URL /ci/admin/user/login/ was not found on this server.” 找不到Codeigniter PHP对象,在此服务器上找不到请求的URL - Codeigniter PHP Object not found, The requested URL was not found on this server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM