I know this has been asked many times, but something strange is happening to me. Apache DocumentRoot is pointing to symfony/web/ and this is my .htaccess inside web/ dir:
DirectoryIndex app_dev.php
#DirectoryIndex app.php
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^app.php(/(.*)|$) %{CONTEXT_PREFIX}/$2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .? - [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)$ app_dev.php [QSA,L]
#RewriteRule ^(.*)$ app.php [QSA,L]
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule .? %{ENV:BASE}app.php [L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /app.php/
</IfModule>
</IfModule>
Well, the thing is www.example.com/route1/
is working and www.example.com/route2/
is throwing an error:
Oops! An Error Occurred
The server returned a "404 Not Found".
Something is broken. Please e-mail us at [email] and let us know what you were doing when this error occurred. We will fix it as soon as possible. Sorry for any inconvenience caused.
While www.example.com/app_dev.php/route2/
is working ok (also www.example.com/app_dev.php/route1/
)
Help?
Update. Cache clear in prod throws this error (I never tried before, I'm working on dev):
[DoctrineCommonProxyExceptionUnexpectedValueException]
The type hint of parameter "userRoles" in method "addRole" in class "MyProjectPanelBundleEntityUser" is invalid.
[ReflectionException]
Class MaycolBlogBundleEntityRole does not exist
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…