• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Cannot remove index.php

#1
[eluser]Unknown[/eluser]
When I try to remove index.php
and access controller: mysite.com/admin
I keep getting Internal Server Error.

.htaccess
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /code/

RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ index.php?/$1 [L]

RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ index.php?/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
Site config
Code:
<Directory /home/mysite.com/public_html/>
Options Indexes Includes FollowSymLinks MultiViews
AllowOverride AuthConfig FileInfo
Order allow,deny
Allow from all
</Directory>

config
Code:
$config['index_page'] = '';
$config['uri_protocol'] = 'REQUEST_URI';

#2
[eluser]Unknown[/eluser]
bump

#3
[eluser]Captain_Fluffy_Pants[/eluser]
yeah mine wouldnt work either

#4
[eluser]Captain_Fluffy_Pants[/eluser]
put this in htaccess
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

#5
[eluser]Unknown[/eluser]
here code for u! That is working with me!

<IfModule mod_rewrite.c>

Options +FollowSymLinks
RewriteEngine on

# NOTICE: If you get a 404 play with combinations of the following commented out lines
#AllowOverride All
#RewriteBase /yourbase

RewriteCond $1 !^(index\.php|images|robots\.txt)

# Send request via index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

<IfModule mod_php5.c>
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>

<IfModule !mod_php5.c>
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

</IfModule>

Ps: write this code into file .htaccess within index.php folder.

#6
[eluser]solid9[/eluser]
Have you checked your error log file?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.