[英]The requested URL /clients/login was not found on this server. Error comes in Codeigniter application
I'm fed-up with server configuration.我受够了服务器配置。 I have one Codeigniter application that runs very well when I hosted that on shared server.我有一个 Codeigniter 应用程序,当我将其托管在共享服务器上时,它运行得非常好。 Now I'm trying to host it on my own server, I had made all required changes, and the site's index.html
file runs properly.现在我试图将它托管在我自己的服务器上,我已经进行了所有必要的更改,并且该站点的index.html
文件运行正常。 But now it gives me an error:但现在它给了我一个错误:
Not Found未找到
The requested URL /clients/login was not found on this server.在此服务器上未找到请求的 URL /clients/login。
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.此外,在尝试使用 ErrorDocument 处理请求时遇到 404 Not Found 错误。
Here is my .htaccess
file:这是我的.htaccess
文件:
RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /home.php?/$1 [L,QSA]
AddDefaultCharset utf-8
I did not get what is the error in configuration.我没有得到配置中的错误是什么。 I've already referred following site:我已经提到了以下网站:
laravel the requested url was not found on this server laravel 在此服务器上找不到请求的 url
https://laracasts.com/discuss/channels/laravel/the-requested-url-login-was-not-found-on-this-server?page=1 https://laracasts.com/discuss/channels/laravel/the-requested-url-login-was-not-found-on-this-server?page=1
How to enable mod_rewrite for Apache 2.2 如何为 Apache 2.2 启用 mod_rewrite
The requested URL /login was not found on this server 在此服务器上未找到请求的 URL /login
Codeigniter - the requested URL was not found on this server Codeigniter - 在此服务器上找不到请求的 URL
Any kind of help is Welcome.欢迎任何形式的帮助。 Thanks in advance.提前致谢。
不应该是/index.php?$1 [L,QSA]
而不是/home.php?/$1 [L,QSA]
my experience:我的经验:
home.php
to index.php
on:重写规则 ^(.*)$ /home.php?/$1 [L,QSA] 更改: home.php
到index.php
like this:像这样:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
in application->config->config.php
set your config.php
like this:在application->config->config.php
设置你的config.php
像这样:
$config['base_url'] = 'http://localhost/app_folder/'; $config['base_url'] = 'http://localhost/app_folder/'; $config['index_page'] = ''; $config['index_page'] = '';
Now access:现在访问:
http://localhost/app_folder/
will show you your login page将显示您的登录页面
Thanks谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.