A web app which has been developed on a local apache (on Centos) works as intended and all routing works fine. However, when uploading the same identical project on a shared hosting, using the same path, and clearing the cache several times , the server is returning 404.
routing.yml:
app:
resource: "@AppBundle/Controller/"
type: annotation
maya:
resource: "@AppBundle/Controller/MayaController.php"
type: annotation
Furthermore, routing is specified on the controller method as:
/**
* @Route("/maya/")
*/
public function initLoad()
{
return $this->render(
'base.html.twig');
}
Cache has been cleared by using the php app/console cache:clear --env prod
command and rm -fr app/cache/*
.
When accessing the web folder i.e www.mywebsite.com/my-site-folder/web/ a list of all the files inside the web folder are listed and when accessing www.mywebsite.com/my-site-folder/web/app.php the base template is being returned i.e as if www.mywebsite.com/my-site-folder/web/maya has been called.
Any suggestions on what the issue may be given it runs well on a local apache server on linux?
Thanks in advance!