havok89 / Hoosk

Hoosk Codeigniter CMS
http://hoosk.org
Other
128 stars 87 forks source link

installing hoosk on subfolder #21

Closed srok closed 7 years ago

srok commented 7 years ago

I'm trying to install hoosk on a subfolder in my site www.example.com/subfolder but links on the admin menu point to www.example.com/admin. Is there a configuration to fix this?

danielteixeirati commented 7 years ago

@srok, Hoosk must be installed in the web root, it will not function from a sub directory

srok commented 7 years ago

If I add <?php echo BASE_URL; ?> to all the broken links and form actions do you think it might work?

danielteixeirati commented 7 years ago

You can install on subdomain, I think this alternative is most appropriate.

havok89 commented 7 years ago

Installing on a subdomain is the best way.

It is possible with a workaround to get CodeIgniter to work in a sub directory, but there is an issue with links in the admin header file which need sorted for this to work. I did forget about this issue in the last update but will sort for the next one

srok commented 7 years ago

I fix every issue changing every link on js and php. Now everything is working. For some specific proccess where $_SERVER['DOCUMENT_ROOT'] where used I change it to: $_SERVER['DOCUMENT_ROOT'].SUBFOLDER a Constant that was added to config.php Also in javascript a global variable with BASE_URL in it comes handy for files uploads.

If you like I can send you my code. I did it all today with the last source from the repo.