Welcome Guest, Not a member yet? Register   Sign In
.htacces is not working with CI 1.7.3, php 5.3 and ubuntu 12.04
#1

[eluser]sonu gautam[/eluser]
Hi All,

I tried to hide the index.php with .htaccess, CI 1.7.3 and php 5.3 and got an error 404.
But it's working fine on my development server which is having php 5.2 and rest of all are the same configuration, i developed my application with HMVC and my .htaccess is

Code:
RewriteEngine on
Options -Indexes
RewriteBase /myapp/

RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /myapp/index.php?/$1 [L]

Anybody suggest me the way how can i resolve this issue should i upgrade my CI version ?

Thanks and best regards

Sonu Gautam
#2

[eluser]sonu gautam[/eluser]
any one can suggest me ?
#3

[eluser]Unknown[/eluser]
#############################################
You can try these three option

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

<Files "index.php">
AcceptPathInfo On
</Files>

(b)The next step is to adjust your config file. Try some of the other URI protocols

'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'] = 'ORIG_PATH_INFO';

©Try changing the rewrite rule to include your subfolder. This is often a problem if your using a temporary URL on a dev server
RewriteRule ^(.*)$ /subofolder1/subfolder2/index.php/$1 [L]

One should work. Also, make sure your index file is set to:

$config['index_page'] = '';







Theme © iAndrew 2016 - Forum software by © MyBB