saltandvinegarcrisps / nano

A really small php 5 boiler plate
The Unlicense
116 stars 18 forks source link

Redirect in the response class - Not redirecting to actual route #6

Closed daltonsutton closed 9 years ago

daltonsutton commented 9 years ago

In my routes.php file, I have the following:

Route::get('/', function() {
    return Response::redirect('/home'); 
});

Route::get('home', function() {
    return Layout::create('pages/home', array(
        'title' => 'Home'
    ));
});

The problem is, when I access my site using "/" it does its job and redirects to where I want it to, but in my browser's url, it shows "/index.php/home" as if my .htaccess didn't exist. I have the rewrite enabled and I can access "/home" perfectly fine. But the redirect doesn't redirect it to "/home", it redirects it to "/index.php/home". To me, it just doesn't look pretty. I know Anchor doesn't have this problem. I've tried to look into it and compare Anchor's system folder to my Nano's system folder, but I couldn't really find what I was looking for.

Just looking for some help on this. Thanks in advance!

daltonsutton commented 9 years ago

I figured it out. :)

In the /app/config/app.php file, the Application Index was set to 'index.php' by default.

This can be closed now.

saltandvinegarcrisps commented 9 years ago

:+1: