user3473118
user3473118

Reputation: 1

phalcon routing does not work properly

I am having the same issue My .htaccess file in project/ is

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule  ^$ public/    [L]
RewriteRule  (.*) public/$1 [L]

server : apache
and the command "a2enmod rewrite" shows that "Module rewrite already enabled"
when i point the browser to project folder i can see the folder structure , when i point to project/public then i can see "Hello world." I am using ubuntu elementary os. Am i Following correctly or is there any error in my installation.

Upvotes: 0

Views: 394

Answers (2)

CodeMonkey
CodeMonkey

Reputation: 3331

when i point the browser to project folder i can see the folder structure , when i point to project/public then i can see "Hello world."

your server should be configured so you can't see the project folder from the browser, the root of your virtualhost should be the public folder

Upvotes: 1

ferodss
ferodss

Reputation: 668

Is IfModule closed?

What you see when you go to another uri? Phalcon's error or Apache 404?

Try to disable mod rewrite, restart apache and then enable it again

a2dismod rewrite
service apache2 restart
a2enmod rewrite
service apache2 restart

I get this error to, but i don't know exactly how i fix it...

Upvotes: 0

Related Questions