CodeIgniter Forums
problem: index.php still exist in after modifying .htaccess - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: problem: index.php still exist in after modifying .htaccess (/showthread.php?tid=43798)

Pages: 1 2


problem: index.php still exist in after modifying .htaccess - El Forum - 07-23-2011

[eluser]Alpha[/eluser]
My .htaccess is

RewriteEngine on
RewriteCond $1 !^(index\.php|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

but the controller still returns http://www.example.com/index.php/welcome.html

.htaccess is located with application folder, system folder and ci main index.php

welcome controller is in application->controllers folder

tnx


problem: index.php still exist in after modifying .htaccess - El Forum - 07-24-2011

[eluser]jzmwebdevelopement[/eluser]
Have you adjusted the following config line in the config.php document?

Code:
$config['index_page'] = '"";

The above should have index.php removed from the ""


problem: index.php still exist in after modifying .htaccess - El Forum - 07-24-2011

[eluser]Alpha[/eluser]
i've $config['index_page'] = ''; but my controllers will not work without index.php at the url Sad


problem: index.php still exist in after modifying .htaccess - El Forum - 07-24-2011

[eluser]jzmwebdevelopement[/eluser]
Try:

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
  RewriteCond $1 !^(index\.php|css|js|images|files|scripts|robots\.txt)
  RewriteRule ^(.*)$ index.php/$1 [L,QSA]
</IfModule>



problem: index.php still exist in after modifying .htaccess - El Forum - 07-24-2011

[eluser]Alpha[/eluser]
controllers will still not work without index.php in url Sad


problem: index.php still exist in after modifying .htaccess - El Forum - 07-24-2011

[eluser]Alpha[/eluser]
eyes are too tired got to sleep i'll be back, tnx


problem: index.php still exist in after modifying .htaccess - El Forum - 07-24-2011

[eluser]Sheldon[/eluser]
Are you sure your server supports the use of a .htaccess file ?
If its a windows IIS server or on some shared servers your host my not allow them wit out contacting them and directly asking to be allowed to use it.

Also, on OSX servers they are not enabled by default. You will need to edit your httpd.conf file.


problem: index.php still exist in after modifying .htaccess - El Forum - 07-24-2011

[eluser]InsiteFX[/eluser]
Try changing this in your application/config/config.php file.
Code:
/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string.  The default setting of "AUTO" works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'AUTO'            Default - auto detects
| 'PATH_INFO'        Uses the PATH_INFO
| 'QUERY_STRING'    Uses the QUERY_STRING
| 'REQUEST_URI'        Uses the REQUEST_URI
| 'ORIG_PATH_INFO'    Uses the ORIG_PATH_INFO
|
*/
$config['uri_protocol']    = "AUTO";
Test until you find one that works!

InsiteFX


problem: index.php still exist in after modifying .htaccess - El Forum - 07-25-2011

[eluser]Alpha[/eluser]
still no Sad

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

i know part of this code work since access to image directory is allowed including the index.php & robots.txt


problem: index.php still exist in after modifying .htaccess - El Forum - 07-25-2011

[eluser]tomas[/eluser]
try to change your .htaccess to

Code:
deny from all

and you don't get a 403 error, it means that the server is set not to allow .htaccess overrides - this needs to be changed in the server's configuration - look for the line
Code:
AllowOverride None
and change it to
Code:
AllowOverride All
, restart server and test again that you get a 403 error.