Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony 404 errors

On my local machine, the symfony project I have created works perfectly.

I have installed symfony on my testing server and it is working fine. When I go to the URL in the browser I get the "Symfony Project Created" page. I ran the check_configuration.php and everything checks out.

The problem I am having is: I have created my database and uploaded the table data. I have uploaded the files from my local machine to the server with FTP. When I try to access the module I created, it throws a 404 Error:

Not Found

The requested URL /mymodule was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Here's some examples:

On my local machine using MAMP, I use the following URL that works fine:

http://localhost:8080/frontend_dev.php/mymodule

After I have uploaded everything, if I go to the testing server URL:

http://my.url.com:8090/

I get the "Project Success" page with the /sf images and styles.

BUT If I try

http://my.url.com:8090/mymodule

I get the 404 error as if the page does not exist, which makes me thik smfony does not know about the frontend module.

Any Help?

like image 951
Carey Estes Avatar asked Jan 13 '12 17:01

Carey Estes


1 Answers

You'll need to do two things:

1) Ensure that mod_rewrite is enabled in Apache.

2) Double-check the .htaccess file in the document root to make sure it is pointing to your app.php. Something along the lines of:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ app.php [QSA,L]
</IfModule>
like image 175
webbiedave Avatar answered Oct 19 '22 23:10

webbiedave