如何为zend框架2配置htaccess使用域中的子文件夹

I have a sub folder domain like:

/domain.com
    L service
        L application
            L ...
        L library
        L public
            L index.php
            L .htaccess

And my .htaccess:

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

When I run domain

http://domain.com/service,

it auto redirect to

http://domain.com/service/public.

But I want it not use /public folder. How to fix it

public L index.php L .htaccess

Put both files outside of public folder and delete public folder. After that open index.php file and replace path

|| define('APPLICATION_PATH', realpath(dirname(FILE) . '/../application'));

to

|| define('APPLICATION_PATH', realpath(dirname(FILE) . '/application'));

give path of your application folder