Reputation: 47
Im using codeigniter and learning a tutorial for CMS. I already added .htaccess in my root directory.
This is my .htaccess file:
<IfModule mod_rewrite.cs>
RewriteEngine on
RewriteCond $1 !^(index\.php|public|\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1
</IfModule>\
i have also enable my .htaccess in wamp located at httpd.conf and change
#LoadModule rewrite_module modules/mod_rewrite.so
to
LoadModule rewrite_module modules/mod_rewrite.so
Here is my error Log in Apache wamp:
[Sat Mar 12 17:26:36 2016] [notice] Apache/2.2.17 (Win32) PHP/5.3.5 configured -- resuming normal operations
[Sat Mar 12 17:26:36 2016] [notice] Server built: Oct 18 2010 01:58:12
[Sat Mar 12 17:26:36 2016] [notice] Parent: Created child process 372
[Sat Mar 12 17:26:36 2016] [notice] Child 372: Child process is running
[Sat Mar 12 17:26:36 2016] [notice] Child 372: Acquired the start mutex.
[Sat Mar 12 17:26:36 2016] [notice] Child 372: Starting 64 worker threads.
[Sat Mar 12 17:26:36 2016] [notice] Child 372: Starting thread to listen on port 80.
[Sat Mar 12 17:26:41 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:43 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:43 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:43 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:44 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:44 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:44 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:44 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:44 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:45 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:45 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:45 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:45 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:46 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:46 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:46 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:46 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:46 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:47 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:47 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:47 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:47 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:47 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:48 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:48 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:48 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/admin
[Sat Mar 12 17:26:52 2016] [alert] [client 127.0.0.1] C:/wamp/www/cms/application/.htaccess: Expected </IfModule> but saw </IfModule>>
[Sat Mar 12 17:26:52 2016] [error] [client 127.0.0.1] client denied by server configuration: C:/wamp/www/cms/system/
[Sat Mar 12 17:26:52 2016] [error] [client 127.0.0.1] client denied by server configuration: C:/Dev, referer: http://localhost/cms/
[Sat Mar 12 17:26:52 2016] [error] [client 127.0.0.1] client denied by server configuration: C:/Dev, referer: http://localhost/cms/
[Sat Mar 12 17:26:52 2016] [error] [client 127.0.0.1] client denied by server configuration: C:/Dev, referer: http://localhost/cms/
[Sat Mar 12 17:27:03 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/public/admin
[Sat Mar 12 17:28:01 2016] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Sat Mar 12 17:28:01 2016] [notice] Child 372: Exit event signaled. Child process is ending.
[Sat Mar 12 17:28:02 2016] [notice] Child 372: Released the start mutex
[Sat Mar 12 17:28:03 2016] [notice] Child 372: All worker threads have exited.
[Sat Mar 12 17:28:03 2016] [notice] Child 372: Child process is exiting
[Sat Mar 12 17:28:03 2016] [notice] Parent: Child process exited successfully.
[Sat Mar 12 17:28:04 2016] [notice] Apache/2.2.17 (Win32) PHP/5.3.5 configured -- resuming normal operations
[Sat Mar 12 17:28:04 2016] [notice] Server built: Oct 18 2010 01:58:12
[Sat Mar 12 17:28:04 2016] [notice] Parent: Created child process 3996
[Sat Mar 12 17:28:04 2016] [notice] Child 3996: Child process is running
[Sat Mar 12 17:28:04 2016] [notice] Child 3996: Acquired the start mutex.
[Sat Mar 12 17:28:04 2016] [notice] Child 3996: Starting 64 worker threads.
[Sat Mar 12 17:28:04 2016] [notice] Child 3996: Starting thread to listen on port 80.
[Sat Mar 12 17:29:33 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/public/admin
[Sat Mar 12 17:30:04 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/cms/public/admin
[Sat Mar 12 17:32:21 2016] [warn] pid file C:/wamp/bin/apache/Apache2.2.17/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Sat Mar 12 17:32:22 2016] [notice] Apache/2.2.17 (Win32) PHP/5.3.5 configured -- resuming normal operations
[Sat Mar 12 17:32:22 2016] [notice] Server built: Oct 18 2010 01:58:12
[Sat Mar 12 17:32:22 2016] [notice] Parent: Created child process 3360
[Sat Mar 12 17:32:22 2016] [notice] Child 3360: Child process is running
[Sat Mar 12 17:32:22 2016] [notice] Child 3360: Acquired the start mutex.
[Sat Mar 12 17:32:22 2016] [notice] Child 3360: Starting 64 worker threads.
[Sat Mar 12 17:32:22 2016] [notice] Child 3360: Starting thread to listen on port 80.
[Sat Mar 12 17:32:30 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/favicon.ico, referer: http://localhost/cms/public/index.php/welcome/
[Sat Mar 12 17:32:54 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/public
[Sat Mar 12 17:33:51 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/public
[Sat Mar 12 17:40:24 2016] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/public
Upvotes: 0
Views: 542
Reputation: 386
Make below changes in application/config.php file
$config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/Your Ci folder_name';
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
Make .htacces file in your root directory using below code
RewriteEngine on
RewriteCond $1 !^index\.php|public|\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
i. First, initiate it with the following command: a2enmod rewrite
ii. Edit the file /etc/apache2/sites-enabled/000-default change All AllowOverride None to AllowOverride All.
iii. Restart your server with the following command: sudo /etc/init.d/apache2 restart
Upvotes: 1