-- aoohralex <[email protected]> wrote (on Wednesday, 16 September 2009, 01:16 AM -0700): > You have given me link: > http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewriter > http://framework.zend.com/wiki/display/ZFDEV/Configuring+Your+URL+Rewriter > > very often we can't modify httpd.conf so we must create .htaccess and based > on above site - .htaccess should look: > RewriteEngine on > RewriteBase / > RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php > > .htaccess should look (or something like that - $1 is very important): > RewriteEngine On > RewriteRule ^(.*)$ /name_project/public/$1 [QSA,L] > > Unfortunately it doesn't work !! Because index.php is in > /name_project/public/index.php - ZF always generate files in folder > 'name_project' and 'index.php' is always in folder 'public' so this > rewriterule is bad ! Somebody should correct this rewriterule.
If you cannot modify your httpd.conf to change the directory, then you should either (a) get a different hosting provider, or (b) learn a bit more about our reasons for pointing to the public/ directory. The reason we have index.php in the public directory and encourage using that directory as the site's DocumentRoot is one of security. All application, library, and configuration files are then *outside* the DocumentRoot -- and thus can never be exposed directly to the web. So, knowing that, you may need to install your project slightly differently. Additionally, why are you working on a hosted solution for development? The Quick Start is written with the assumption that you are installing and developing on your development machine -- over which you should have *full* control. Use it that way, learn the framework -- and then as you prepare to launch your site, start thinking about how your host is setup and how you can modify your install to work well with it -- while still retaining the guidelines we recommend. > About connect to database - I will see B-) > > Carlton: > Not everybody needs layout ? :O Then somebody can delete 1 folder + 1 line > of code - I think this is faster than create folder + write 1 line. What is > more - in Symfony Framework or in ASP.NET - we have layout !! In ZF we don't > have layout - we must create layout....... On the flip side, if you *do* need a layout, "somebody can add 1 folder and 1 line of code." This is basically the same as the converse. ZF offers the flexibility to make your own choices about what you include. Also, as noted, we're already considering having layouts enabled by default; however, we need the ability to remove items from the project using the CLI tool before we start adding more default items. <snip> > About Symfony - yes it can generate many things but I don't use Symfony for > generate these things - I like write everything by myself :-P You're being a bit contrarian here. In your first email, you're saying the CLI tool should do more. Now you're saying you like to write everything yourself. Which is it? It's normal to contrast new things with those you know. However, please be politic; attacking something new you're learning because it's not like what you know is not a good way to learn. Keep your mind open, and take your time. If there are things you feel could be better -- help contribute to the project. -- Matthew Weier O'Phinney Project Lead | [email protected] Zend Framework | http://framework.zend.com/
