views:

185

answers:

1

my host account is something like:

~
~/public_html
~/public_html/system/application

to access my web, I need to put http://example.com/~userid in address bar

I install codeigniter in the ~/public_html directory, I can access http://example.com/~userid.

The Welcome page shows correctly, and the related user guide pages show correctly.

The problem is: if I create a new controller, and create new views, the web page just show "Error 404: Document Not Found". If I use http://example.com/~userid/welcome/index it has the same problem.

If I use base_url() function it shows http://example.com/~userid/

What should I do do fix this problem?

Thanks in advance!

+2  A: 

Try http://example.com/~userid/index.php/welcome/index.

It looks like your URL rewriting is not set up or badly configured. This is the default way if URL rewriting is disabled.

EDIT See this page of the user guide, especially the section "Removing the index.php file" on how to set up URL rewriting.

Franz
I would follow @Franz's suggestion and look into your URL rewriting in the **.htaccess** file.
cballou
@Franz: Thank you! It works. I will look into the url page
Yc Zhang
Then you can accept this answer. Gives you 2 reputation points and me, uhm, a little more ;)
Franz