/    Sign up×
Community /Pin to ProfileBookmark

only default controller is loading for all request – Critical

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 [url]http://sitename.com[/url]
and another true copy in a subfolder like [url]http://sitename.com/abc[/url]

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

When i tried like this [url]http://sitename.com/index.php/gallery/[/url] then it worked well…
but [url]http://sitename.com/gallery/[/url] 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|robots.txt)
RewriteRule ^(.*)$ index.php/$1 [L][/CODE]

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

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@NogDogMay 06.2010 — Don't know if it matters, but the CI manual shows a "/" before the redirect path:
<i>
</i>RewriteRule ^(.*)$ [color=red][b]/[/b][/color]index.php/$1 [L]
Copy linkTweet thisAlerts:
@jayapalchandranauthorMay 07.2010 — HI,

I solved it.

In the above htaccess i replaced the last line

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

with this

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?
Copy linkTweet thisAlerts:
@NogDogMay 07.2010 — I missed that part. Yes, you want that "?", as it puts the part that follows into the URL query string, where the CI framework can then parse it from $_GET.
×

Success!

Help @jayapalchandran spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...