Welcome Guest, Not a member yet? Register   Sign In
only default controller is loading for all request - Critical
#1

[eluser]jayapalchandran[/eluser]
Hi,
My codeigniter project is in live.
I have two copies of it. One in the root and another in a subfolder.
Both are configered to work normal.

The root copy if the one which was made after testing in a subfolder.
While running from the a subfolder all worked well.

But when copied to the root folder the default controller is loading for all requests.
But were as in subfolders and in other servers it is working well.

It is like the following
A true copy in root folder like http://sitename.com
and another true copy in a subfolder like http://sitename.com/abc

when requesting like this http://sitename.com/gallery the default controller is loaded instead of gallery controller.

When i tried like this http://sitename.com/index.php/gallery/ then it worked well...
but http://sitename.com/gallery/ is showing only the default controller. that is the index page.

here is my htaccess...


Code:
php_flag magic_quotes_gpc off
php_flag short_open_tag on

RewriteEngine on


RewriteCond $1 !^(index\.php|images|css|static|font|xml|flash|galleryimages|htc|store|robots\.txt)
RewriteRule ^(.*)$ index.php/$1 [L]

The server is
Linux barracuda.elinuxservers.com 2.6.27.18-21 #1 SMP Tue Aug 25 18:13:37 UTC 2009 i686
PHP Version 5.2.9
#2

[eluser]dmorin[/eluser]
Has it ever worked correctly on this server? Maybe try changing$config['uri_protocol'] = "PATH_INFO"; instead of auto in the config file?
#3

[eluser]jayapalchandran[/eluser]
Hi,
I solved it.
In the above htaccess i replaced the last line

Code:
RewriteRule ^(.*)$ index.php/$1 [L]

with this

Code:
RewriteRule ^(.*)$ index.php?$1 [L]

The modification is i changed the index.php/ to index.php?

and the pages loaded as expected.

Will there be any side effects cause of the above modification?
#4

[eluser]theprodigy[/eluser]
not that I'm aware. As a matter of fact, from what I remember, any site hosted with godaddy needs the ? rather then /. There are other servers and hosters out there that require it this way, I just remember the hassle of having to find the issue when dealing with a godaddy site. Once that change was made, everything seemed to work just fine, so I don't believe you will run into any side effects/problems/issues




Theme © iAndrew 2016 - Forum software by © MyBB