This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Route starting with /web causes 404 error

Discuss installing Symfony 2 here

Route starting with /web causes 404 error

by laukotomi » Sun Oct 27, 2013 11:32 am

Hi!

I am new with Symfony (I am trying to create my first website with Symfony 2.3) and I have a problem some problems after copying the website files from my local xampp server to my web server. I made a mod_rewrite rule on my server to redirect all the queries to the Symfony's "web" directory. It works well with every link of the site except one which has the pattern "/website-building". The problem must be with the "/web" part of the pattern, because "/wbsite-building" (and any pattern which not begin with "/web") works. I really hope that there is a common solution for this! I was searching for 2 days for the solution of this problem, but couldn't find any.. :(


Cheers,
Tomi
laukotomi
Junior Member
 
Posts: 2
Joined: Sun Oct 27, 2013 11:19 am

Re: Route starting with /web causes 404 error

by laukotomi » Mon Oct 28, 2013 11:19 am

The problem is solved. Just don't try to make rewrite rules from the root directory to the Symfony's web directory, but copy the app.php and the .htaccess files from web directory to your root directory, after that modify the contents of the request(...) functions of the app.php properly and Symfony will work well.
laukotomi
Junior Member
 
Posts: 2
Joined: Sun Oct 27, 2013 11:19 am