0

I'm fed-up with server configuration. I have one Codeigniter application that runs very well when I hosted that on shared server. 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. But now it gives me an error:

Not Found

The requested URL /clients/login was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Here is my .htaccess file:

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

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

The requested URL /login was not found on this server

Codeigniter - the requested URL was not found on this server

Any kind of help is Welcome. Thanks in advance.

Ganesh Aher
  • 1,118
  • 3
  • 21
  • 51
  • I think this would help you [https://stackoverflow.com/questions/15492446/codeigniter-2-the-requested-url-was-not-found-on-this-server-404-error-ci-is?answertab=votes#tab-top](https://stackoverflow.com/questions/15492446/codeigniter-2-the-requested-url-was-not-found-on-this-server-404-error-ci-is?answertab=votes#tab-top) – krishnaraj Sep 04 '17 at 11:00
  • @krishnaraj I've made changes like that also, but same error occurred. – Ganesh Aher Sep 04 '17 at 11:08

2 Answers2

0

Shouldn't be /index.php?$1 [L,QSA] instead of /home.php?/$1 [L,QSA]

Mihai Cata
  • 43
  • 7
0

my experience :

  1. on : Rewrite Rules ^(.*)$ /home.php?/$1 [L,QSA] change :home.php to index.php

like this :

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
  1. in application->config->config.php set your config.php like this :

    $config['base_url'] = 'http://localhost/app_folder/'; $config['index_page'] = '';

Now access :

http://localhost/app_folder/ 

will show you your login page

Thanks