Welcome Guest, Not a member yet? Register   Sign In
URI segments issues on new host?
#1

[eluser]industrial[/eluser]
Hi! Doing some work here for a and I am stuck with getting the URI-segmenting to work properly. I have tried several different htaccess files, and all different URI protocols.

Some of the URI protocols kills the site totally, but the best i can get working is following:
http://www.mywebsite.com/codeigniter/ind...ontroller/

However, when i enter anything as a next URI segment, it all goes wrong and the site returns Codeigniters own 404 message. ( for clarification: http://www.mywebsite.com/codeigniter/ind...ler/value/)


What can i do? How can i troubleshoot this?

Thanks!
#2

[eluser]theprodigy[/eluser]
can you post your htaccess file and your config/routes.php file please
#3

[eluser]industrial[/eluser]
[quote author="theprodigy" date="1261022584"]can you post your htaccess file and your config/routes.php file please[/quote]

Hi!

I have no htaccess file for the moment. Routes files is not changed either.

The default htaccess does not make any difference:
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

I have aswell tried to use this tip, but without any result: http://ellislab.com/codeigniter/user-gui...oting.html
#4

[eluser]theprodigy[/eluser]
Quote:However, when i enter anything as a next URI segment, it all goes wrong and the site returns Codeigniters own 404 message. ( for clarification: http://www.mywebsite.com/codeigniter/ind...ler/value/)

When you enter that url, are you sure the method you are calling (in your above example, the "value") exists?

If so, double check spelling and possibly capitalization issues.
#5

[eluser]jedd[/eluser]
[quote author="industrial" date="1261022316"]
I have tried several different htaccess files, and all different URI protocols.
[/quote]

Show - and describe results - rather than assure.

Quote: ( for clarification: http://www.mywebsite.com/codeigniter/ind...ler/value/)

Don't you mean:
http://www.mywebsite.com/codeigniter/ind...ontroller/method/value


Quote:The default htaccess does not make any difference:
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

That .htaccess will redirect you to the web root - whereas your URL seems to imply that you have /codeigniter (ie, you're not at web root). So you'd want to change that last line to:
Code:
RewriteRule ^(.*)$ /codeigniter/index.php/$1 [L]
// or
RewriteRule ^(.*)$ ./index.php/$1 [L]

Crank up your web server's log files to see what pages are being loaded (or failing to be found).

You can also crank up the error logging with CI.




Theme © iAndrew 2016 - Forum software by © MyBB