Reputation: 43
I have started learning fat free framework, after installing it, when I wrote
require __DIR__.'/lib/base.php';
F3::set('DEBUG',3);
F3::set('UI','ui/');
F3::route('GET /',function () {echo "hello";});
F3::run();
in index.php it displayed hello on screen, but when I add this to above
F3::route('GET /about', function () {echo "hello";});
and when I opened localhost/freefat-master/about then page not found appears on the screen. following are the details of my .htaccess file
# RewriteBase /
RewriteCond %{REQUEST_URI} \.ini$
RewriteRule \.ini$ - [R=404]
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /index.php [L,QSA]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
i have already tried changing RewriteRule to /fatfree/index.php. Please suggest me something. i am using linux,mysql and apache.
Upvotes: 1
Views: 793
Reputation: 43
Just added a new parameter 'SERVERNAME' in /etc/apache2/000-default and it worked, thanks to all the repliers.
Upvotes: 0
Reputation: 4690
You don't have to change anything in your .htaccess
except for the RewriteBase
line. Just change it to
RewriteBase /fatfree-master/
and it should work.
Upvotes: 1
Reputation: 11
If you're actually trying to open
localhost/freefat-master/about
you better make sure that is the actual path. Usually it's called
localhost/fatfree-master/about
Obviously you might have changed this.
Upvotes: 0