EllisLab text mark
Advanced Search
     
Unable to view anything but default route
Posted: 19 July 2007 05:19 PM   [ Ignore ]
Joined: 2007-06-27
12 posts

Just like the title says, I’m unable to view anything but default route. I thought the problem stemmed from me trying to get the index.php out of the url by using an .ht file - but I took that out and tried to view them with the /index.php/ in the URL and no dice.

For some reason I can’t view anything. I don’t even know what to post on here for you guys to look at. I didn’t come up with anything in searches. I must be missing something small. I only have two controllers - displaying almost very close to total static pages. Very simple because I’m just now building out the website. And I’ve run into this problem.

Arg, driving me nuts. Someone say something that I’m over looking please. =)

 
Posted: 19 July 2007 05:27 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2007-06-27
12 posts

Oh I should also mention that nothing is 404’ing - it just reloads the same default route. As if nothing changed. So I’m having a horrible time trying to debug this problem because I’m not getting any errors.

 
Posted: 19 July 2007 08:13 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2006-11-06
74 posts

A couple of things:

1. Check your config/routes.php and make sure you set it to your own default controller.
2. Check your .htaccess file…

it should look like this:

RewriteEngine On
RewriteCond 
%{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteRule 
^(.*)$ index.php/$1 [L] 

if it’s not that.. post some of your code so we can take a look at it..
also, check your config/config.php file and make sure the index.php is OUT of the index_page settings and that you have the base url setup

 Signature 

Senior Web Architect
Hale Technology Group
@jkevinburton

 
Posted: 20 July 2007 09:59 PM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2007-05-03
34 posts

I’m having the same problem as “emuexplosion”.  Mine was working, before ... I use TortoiseSVN Update and I’m updated to the latest build, 672 (presumably CI 1.5.4).

Now, nothing but the default Index() works.  I can’t even call my test() functions.  These test functions are in my default controller class file, as is the Index(); so, it’s getting to the default controller (specified by ... RewriteBase /CodeIgniter/ ) ok.

My application calculates sidebar links, which look correct; but, it won’t route to them.

I noticed that when I follow the RewriteRule on the (User Guide URLs page, it renders the webRoot, rather than CodeIgniter, which I’ve located in a directory right below the webRoot e.g. /htdocs/CodeIgniter/

The 1.5.4 User Guide says to use:

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

but, it will only render the XAMPP start page.

If I delete the slash before index.php, like this:

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

it goes to my default controller index() and page, just like “emuexplosion” is experiencing.

Here’s the .htaccess, I’m using ...

RewriteEngine On

RewriteBase directory must be set
relative to /htdocswebRoot
RewriteBase 
/CodeIgniter/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d

RewriteCond 
$!^(index\.php|images|robots\.txt)

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

I, too, am going nuts, since I can’t even get an echo to work - to test my way out of it.  downer

Thanks, in advance, for whatever guidance and insights ...

 Signature 

Mike

 
Posted: 20 July 2007 10:09 PM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Joined: 2007-06-27
12 posts

Well I’m sorry this is happening to you too.. but I’m sort of thankful that I’m not the only one.

It used to work just fine, and now it doesn’t. Only two things changed, 1.5.4 or CF’s View’s library.

And [CoDeR], I played with my .htaxs file for an hour and nothing renders past the default route.

 
Posted: 20 July 2007 10:16 PM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Joined: 2007-06-27
12 posts

And it turns out it is 1.5.4 - all I did was upload /system/ had it overwrite everything, and go back in and change the autoload/config/routes file. And it works like it should.

So, I think there is something wrong with 1.5.4 and how it operates on certain servers or something.

 
Posted: 21 July 2007 02:49 PM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2007-05-03
34 posts

Fixed !  Yea, Rick !!!  ... bless you (for the prompt fix)  tongue laugh
... I wasn’t losing my marbles (at least not those not yet lost grrr )

Per this morning’s update:

UpdatedC:\xampp\htdocs\CodeIgniter\system\codeigniter\CodeIgniter.php  
Updated
C:\xampp\htdocs\CodeIgniter\system\libraries\URI.php  
Completed
At revision674 

 

... my site “just worked”!

It seems FASTer, too!  surprised calculating my sidelinks (from SQLite through MVC) in 0.017 seconds, compared to about 0.035 seconds, previously.

However, (fyi:) the RewriteRule line still requires removing the forward-slash preceding index.php i.e.

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

rather than

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

as directed in the User Guide (on page:

General - URLs

 Signature 

Mike

 
Posted: 24 July 2007 03:51 PM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Joined: 2007-07-13
9 posts

nm