CodeIgniter Forums
.htacces is not working with CI 1.7.3, php 5.3 and ubuntu 12.04 - 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: .htacces is not working with CI 1.7.3, php 5.3 and ubuntu 12.04 (/showthread.php?tid=54265)



.htacces is not working with CI 1.7.3, php 5.3 and ubuntu 12.04 - El Forum - 08-30-2012

[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


.htacces is not working with CI 1.7.3, php 5.3 and ubuntu 12.04 - El Forum - 09-03-2012

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


.htacces is not working with CI 1.7.3, php 5.3 and ubuntu 12.04 - El Forum - 09-11-2012

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