CodeIgniter Forums
URI segments issues on new host? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: URI segments issues on new host? (/showthread.php?tid=25565)



URI segments issues on new host? - El Forum - 12-16-2009

[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/index.php/controller/

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/index.php/controller/value/)


What can i do? How can i troubleshoot this?

Thanks!


URI segments issues on new host? - El Forum - 12-16-2009

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


URI segments issues on new host? - El Forum - 12-16-2009

[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-guide/installation/troubleshooting.html


URI segments issues on new host? - El Forum - 12-16-2009

[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/index.php/controller/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.


URI segments issues on new host? - El Forum - 12-16-2009

[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/index.php/controller/value/)

Don't you mean:
http://www.mywebsite.com/codeigniter/index.php/controller/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.