2009年2月19日星期四

Re: [fw-mvc] QuickStart GuestBook Link Not working - Beginner

If your index.php file does not reside on the web root of the server, you may need to modify your .htaccess file to point to the correct location.

You can either set your rewrite rule to point to /mysite/index.php (relative to the document root) or use the RewriteBase [1] to specify the base directory for all rewrites. Here is my .htaccess file, just replace /mysite/ with the path to your index.php file:

RewriteEngine On
RewriteBase /mysite/
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

1. http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html#RewriteBase

-Hector


On Thu, Feb 19, 2009 at 7:30 AM, Roalt <nabble.com@roalt.com> wrote:

I have the same problem, I think I have my apache configured in the right
way.

Could it has to do that the example should be running in a virtual host,
instead of in a sub-directory of your apache localhost directory?

The problem is a bit critical as my own example experienced the same issues.


Ed Lazor-3 wrote:
>
> Zend Framework relies upon Apache's mod_rewrite plugin.  Make sure
> it's installed and working.  Make sure Apache is configured to allow
> you to use htaccess files.  Also check the .htaccess file in your
> public directory to make sure it's installed and working properly.
>
> For more information, visit:
> http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewriter
>
>
>
> On Sun, Feb 8, 2009 at 6:31 PM, araujoao <john@araujofamily.org> wrote:
>>
>> Hello,
>>
>>   Thanks for your attention on the question below.
>>
>>   I am trying to play with the quickstart tutorial. But, I am finding
>> some
>> big hurdles to move on.
>>   I first followed the tutorial, which was going fine, until I got to the
>> guestbook link. It does not work at all, always giving me 404, as you see
>> in
>> the message below . I could not move forward from there. After, reviewing
>> the quickstart I could not find the error, I then downloaded the
>> quickstart.
>> That,  gives me the same error.
>>
>>  So, basically, I am back to square zero .
>>
>>  Can anyone give me a hint where to go?
>>
>>
>>
>> Thanks,
>>
>> Joao,
>>
>> ---- Error shown  when I hit guestbook ----
>>
>> Object not found!
>>
>> The requested URL was not found on this server. The link on the referring
>> page seems to be wrong or outdated. Please inform the author of that page
>> about the error.
>>
>> If you think this is a server error, please contact the webmaster.
>>
>> Error 404
>>
>> localhost
>> 02/08/09 20:55:47
>> Apache/2.2.6 (Win32) DAV/2 mod_ssl/2.2.6 OpenSSL/0.9.8g
>> mod_autoindex_color
>> PHP/5.2.5
>> --
>> View this message in context:
>> http://www.nabble.com/QuickStart-GuestBook-Link-Not-working---Beginner-tp21906196p21906196.html
>> Sent from the Zend MVC mailing list archive at Nabble.com.
>>
>>
>
>

--
View this message in context: http://www.nabble.com/QuickStart-GuestBook-Link-Not-working---Beginner-tp21906196p22102964.html
Sent from the Zend MVC mailing list archive at Nabble.com.


没有评论: