I am using the crud-admin-generator (http://crud-admin-generator.com/) to generate a quick backend for my web app, which is based on the silex framework.
My app structure is:
MyApp
->index.php
->some_other_files
->...
->admin (the crud-admin-generator git clone)
->gen
->src
->vendor
->web
->controllers
->resources
->views
1) When I access the admin I currently need to use http://localhost/MyApp/admin/web
. I want to remove the /web
part.
I tried creating a custom htaccess
in the admin
folder with:
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /web
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [QSA,L]
</IfModule>
But I keep getting an error: The requested URL /web/index.php was not found on this server.
2) The generated admin panel uses the silex framework, is there a easy way for me to use the doctrine component or the framework itself for my frontend as well (files outside the admin folder)? Would I need to manually change the routing paths of all the generated admin files? Sorry if I sound confused.