• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem: index.php still exist in after modifying .htaccess

#1
[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

#2
[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 ""

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

#4
[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>

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

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

#7
[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.

#8
[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

#9
[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

#10
[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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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