RE: Document root in public dir
08-05-2015, 11:35 PM
(This post was last modified: 08-05-2015, 11:37 PM by Swift-R.)
(08-05-2015, 10:30 PM)kandrews Wrote: Ah ok well something like this might work:
Module Admin -> Apache Config -> Override Vhost -> Custom Entry
Code:<Directory "/var/zpanel/hostdata/username/public_html/panel.domain.com/">
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)$ ./public/$1 [L]
</Directory>
<Directory "/var/zpanel/hostdata/username/public_html/panel.domain.com/public/">
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</Directory>
That worked flawlessly, thank you!
Edit: Just had to remove the ending slash on the directory.
One more thing, do you think it is possible to override the default DocumentRoot? Instead of redirecting...