Open sarpaykent opened 9 years ago
I got this error when I redirect "../" to "../web/" http://prntscr.com/7gaso0
As said on the Read-me, you CAN'T use a localhost/...
path.
You MUST use a virtual host.
You need point the document root of your virtual host to /path_to/admingenerator/web
This is an example of VirtualHost:
<VirtualHost *:80>
DocumentRoot /path_to/admingenerator/web
DirectoryIndex index.php
<Directory "/path_to/admingenerator/web">
Options Indexes FollowSymLinks
Order Allow,Deny
Allow from all
AllowOverride all
<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir none
</ifModule>
</Directory>
</VirtualHost>
You can customize the url using the .htaccess file, maybe this will help you: http://stackoverflow.com/questions/24952846/how-do-i-remove-the-web-from-my-url/24953439#24953439
If this can help you, here is my config (Linux - ubuntu / Xampp), you'll need to adapt if you are on a windows...
project1.local
as a Vhost (aka fake-NDD) for my project1 (It's just a front-end website)admin.project1.local
IS an crud-admin-generator/opt/lampp/etc/extra/httpd-vhosts.conf
My Lampp VHost config file (with localhost
, project1.local
and admin.project1.local
)
<VirtualHost *:80>
DocumentRoot "/opt/lampp/htdocs/"
ServerName localhost
ServerAlias www.localhost
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/opt/lampp/htdocs/www/project1"
ServerName project1.local
ServerAlias www.project1.local
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "/opt/lampp/htdocs/www/admin_project1/web"
DirectoryIndex index.php
ServerName admin.project1.local
ServerAlias www.admin.project1.local
<Directory "/opt/lampp/htdocs/www/admin_project1/web">
Options Indexes FollowSymLinks
Order Allow,Deny
Allow from all
AllowOverride all
<IfModule mod_php5.c>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir none
</ifModule>
</Directory>
</VirtualHost>
/opt/lampp/htdocs/www/admin_project1/web/.htaccess
the HTACCESS of the crud-admin-generator
php_flag display_errors off
Options -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteBase /
RewriteRule ^ index.php [QSA,L]
</IfModule>
and last :
/etc/hosts
(local DNS resolver that allow you to redirect your fake NDD to the local VHOST)
127.0.0.1 localhost
127.0.1.1 blag-laptop
127.0.0.1 project1.local admin.project1.local
Thank you for replys! I found much easier way to do that. I'm writing here if any one wants to do that. Move "./web/index.php" to "./index.php" and "./web/.htaccess" to "./htaccess" change "./index.php" like require_once DIR.'/web/controllers/base.php';
You are done !
You don't have any problem with resources ? (font / img) nor with the AJAX requesting ?
No, because I make all them lime {{ app.asset_path }}/...
My link is like .../web/tablename but i wanna change it like .../tablename how can i do it I tried bunch of things but not even changing anythink thanks.