My default 'zend' application has this default structure

/zend + webroot
    /application
    /config
    /library
    /public
        .htaccess
        index.php

and also the default .htaccess redirects the different controller/action particulars via ./public/index.php

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

I personally use this default hyperlink to access the application

http://domain/index.php

I have now gone to live in a shared host, in which the webroot is over the 'zend' root.

/webroot
    /zend
        /application
        /config
        /public
            index.php
           .htaccess

however i are only able to access my application via this URL

http://domain/zend/public/index.php

i wish to have the ability to use

http://domain/zend/index.php

and also have .htaccess redirect.

and i am wondering the way i can tweak the .htaccess file to redirect the URL demands. I just read this tutorial however i didnt work with me

/webroot
    /zend
        .htaccess
        /application
        /config
        /library
        /public
            index.php

This is actually the .htaccess content within this situation

RewriteEngine On

RewriteRule ^\.htaccess$ - [F]

RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ /public/index.php [NC,L]

RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ /public/$1

RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]

RewriteRule ^public/.*$ /public/index.php [NC,L]

Can anybody place anything?

Create zend/index.php that contains this code:

<?php include 'public/index.php';

Now create zend/.htaccess that contains this code:

SetEnv APPLICATION_ENV development

RewriteEngine On
RewriteRule .* index.php

Make certain that the images/css/js files are within zend/public/ and don't take away the zend/public/.htaccess file :)

Remember that the request's baseUrl does not include '/public', so you will need to add it yourself whenever you reference public facing files.

Regards,

Take advantage of...

Remember to modify your RewriteBase.

Most shared hosts I have used still permit you to upload files outdoors the net root. For instance,

/home/{username}/webroot/

...you are able to still upload to /home/{username}/ like:

/webroot
    index.php
   .htaccess
/application
/config

Then inside your bootstrap, just replace public with webroot, or you have ssh access remove the present webroot and change it having a symbolic connect to the zend public directory, like:

rm -f webroot
ln -s public webroot