How to use Phalcon without .htaccess?

My .htaccess

<IfModule mod_rewrite.c> RewriteEngine on

RewriteRule  ^$ public/    [L]
RewriteRule  (.*) public/$1 [L]

</IfModule>

What do you want? Avoid that rewrite from .htaccess without change your app structure?

Simply put your public folder as document root in the VH block

<VirtualHost *:80>
    # ...
    DocumentRoot /var/www/html/mywebsite/public
    # ...
</VirtualHost>


2.3k

I am using .htaccess to rewrite the public folder, but I can not remove it. example I access => mydomain.com/path/ and shows the folder normally, but when I go => mydomain.com/path without the "/" and the url is loaded => mydomain.com/public/path/.

I want to remove the "public" in the url.

edited Mar '15

So /path is a folder with public access?

Try with this then:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule  ^$ public/    [L]
RewriteRule  (.*) public/$1 [L]