Welcome Guest, Not a member yet? Register   Sign In
Problem with segment based URL
#1

[eluser]tamtrek[/eluser]
Hello,

Im new to CI and i have a Problem.

I found no solution in the Topics before so i created a new one.


I've installed CI 1.5.4 on a Linux based Server with Apache 2.0.46 and PHP Version 5.1.6


All seems to work fine, the Welcome message appears.
But when i try to load a controller with
Code:
www.myurl.com/st/index.php/welcome
there is an error Message "File not found".

So i tried the other way:
Code:
$config['enable_query_strings'] = TRUE;
and
Code:
www.myurl.com/st/index.php?c=welcome
This works.

I've also tried to switch $config['uri_protocol'] to any possible value, but this dont seems to change anything.

Greetz
#2

[eluser]tamtrek[/eluser]
No Ideas?

Too few Infos?

Too bad english?

Wink
#3

[eluser]xwero[/eluser]
Maybe the error get thrown because it's the default controller, i never tried it. create your own controller an check if you can call your controller without a method segment. You need to have an index method in your controller to do this.
#4

[eluser]tamtrek[/eluser]
hi,

I've done this already with a controller named overview with the same issue.
Both Controllers have the index Function.

I've tried also to create a different Function called test, but there is also the 404 error.
The 404 error seems to be an Apache error Message.

thanx for posting.

Greetz
#5

[eluser]maadmac[/eluser]
[quote author="tamtrek" date="1199385096"]
Code:
www.myurl.com/st/index.php/welcome
[/quote]

Could be two things:

1. What's your base URL set to? It might be looking here instead: http://myurl.com/index.php/

2. If welcome is the default controller, then you shouldn't need it in the URL. So try either myurl.com/st/index.php or myurl.com/index.php. What do you get?
#6

[eluser]tamtrek[/eluser]
Quote:myurl.com/st/index.php
shows me the default welcome Page, thats ok.

I searched again in the Documentation and found there the Solution:

I have to use ? after index.php :
Quote:myurl.com/st/index.php?/mycontroller

Seems to be a Problem with the PATH_INFO Variable.
But i have no guess whats wrong with the Server config.
Is this a Register_Globals issue or something like this?

Greetz & thx for help.




Theme © iAndrew 2016 - Forum software by © MyBB