We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Shows 'public' with directory in public

Hello guys, I will try to make this as short as possible. I've seen these threads on the forum before but I have .htaccess the same as they recommended. Still I achieve to get 'public' in my url.

In my root I have this:

<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{HTTPS} !=on
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    RewriteRule  ^$ public/    [L]
    RewriteRule  (.*) public/$1 [L]
</IfModule>

And in my public folder I have this:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
</IfModule>

When forwarding to my forums I receive this in the url: Url image

And you sure you use apache and have mod rewrite enabled?

edited Dec '17

I am pretty sure that I am using apache and have mod rewrite enabled. All my other routes do map without the public folder. This is only the directory 'community' under the 'public' directory.

I'm sorry for the late response, I will confirm that I am using apache later today. I can only check this when I am home.



1.6k
Accepted
answer

This is solved, I had to create a rewrite file in the community part of my website.