1
votes

I have imported a codeigniter application to my server. When I am trying to browse to any other page from index page its showing my url not found error. I have changed my base url in config.php file and my .htaccess file looks like this-

RewriteEngine on
#RewriteCond $1 !^(index\.php|public|\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

# BEGIN Compress text files^M
<ifModule mod_deflate.c>
#  AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain^M
#  AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml^M
#  AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml^M
#  AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json^M
#  AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf^M
#  AddOutputFilterByType DEFLATE font/truetype font/opentype^M
</ifModule>
# END Compress text files^M

# BEGIN Turn ETags Off^M
#FileETag None^M
# END Turn ETags Off

Also when I am trying to access the page with this url format-

http://localhost/projectname/index.php/signin?uid=%271441336195

Its accessible.I am running apache server on linux. Any help will be highly appreciated.

1

1 Answers

0
votes

in config.php change this

$config['base_url'] = '';
$config['index_page'] = '';

and .htaccess should be

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

Note: Make sure

  1. Uploaded all files(system, application,....)
  2. .htaccess place outside appllication folder