logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: rewrite rule for learn Fat Free Framework
Author
dheeraj4uuu



Joined: 17 Mar 2011
Posts: 1

PostPosted: Thu 17 Mar '11 10:00    Post subject: Reply with quote

I am trying to setup and learn the Fat Free Framework for PHP. http://fatfree.sourceforge.net/

It's is fairly simple to setup and I am running it on my machine using MAMP.

I was able to get the 'hello world' example running just fin:

require_once 'path/to/F3.php';
F3::route('GET /','home');
function home() {
echo 'Hello, world!';
}
F3::run();

But when I try to add in the second part, which has two routes:

require_once 'F3/F3.php';

F3::route('GET /','home');
function home() {
echo 'Hello, world!';
}

F3::route('GET /about','about');
function about()
{
echo 'About Us.';
}

F3::run();

I get a 404 error if I try the second URL: /about

Not sure why one of the mod_rewrite commands would be working and not the other.

Below is my .htaccess file:

# Enable rewrite engine and route requests to framework
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA]

# Disable ETags
Header Unset ETag
FileETag none

# Default expires header if none specified (stay in browser cache for 7 days)
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A604800
</IfModule>

can you help me regarding this??
Back to top
rockjock



Joined: 25 Mar 2011
Posts: 8

PostPosted: Fri 25 Mar '11 16:04    Post subject: Reply with quote

Are you sure the filename is .htaccess? The FatFree package contains htaccess, not .htaccess. You should rename it. It's named that way in the archive because it may not be visible in some zip managers.
Back to top


Reply to topic   Topic: rewrite rule for learn Fat Free Framework View previous topic :: View next topic
Post new topic   Forum Index -> Apache