Welcome Guest, Not a member yet? Register   Sign In
problem with welcome.php in codeigniter 2.1.3
#1

[eluser]Unknown[/eluser]
I use codeigniter 2.1.3 and i have some function in main controller welcome.php

I am using Codeigniter 2.1.3.

I changed

$config['index_page'] = 'index.php';
into

$config['index_page'] = '';
I placed my .htaccess file under application folder with the lines of code:

# Customized error messages.
ErrorDocument 404 /index.php

# Set the default handler.
DirectoryIndex index.php

# Various rewrite rules.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
</IfModule>


when i'm trying to call forexample http://localhost/cdshop/welcome/cat/7

they show nothing on the page but with http://localhost/cdshop/ i see index() and show template correctly

bu for navigation in other function in the same class , we couldn't see any thing.

as above I put a new .htaccess file in the root of "cdshop" project neer the index.php

how to solve it ?
#2

[eluser]CroNiX[/eluser]
Are you sure rewrite is enabled in apache? Are you sure it's named "mod_rewrite.c" (some use a .so extension)? Try removing the <IfModule> block and see if it works.

Also, if your CI install is in a subdirectory, you'd probably need to add the subdirectory to the RewriteBase in your htaccess or maybe make sure it's part of your base_url. Or better yet, create a virtual server in apache so it can be in it's own document_root.




Theme © iAndrew 2016 - Forum software by © MyBB