picocms / Pico

Pico is a stupidly simple, blazing fast, flat file CMS.
http://picocms.org/
MIT License
3.83k stars 614 forks source link

"patch-1": Make index.php.dist runnable from top directory. #457

Closed jjtmp closed 5 years ago

jjtmp commented 5 years ago

Objective is that you don't have to unpack the picocms package in the http(s) servers root path as single files but put it in a directory called "picocms" while keeping it accessible by "http://top.level.domain/?sub".

PhrozenByte commented 5 years ago

Hmm... Unfortunately I don't really understand what you're trying to achieve and why you're trying to achieve it. :confused:

I first though you're trying to move some files to a folder different than httpdocs, but this doesn't seem to be the case. What are the advantages of moving Pico to a sub-folder, but not the index.php?

jjtmp commented 5 years ago

The main goal is to keep the main http site directory clean because this directory always tends to get full by

In order to manage all these files (and not to loose overview on clean-ups thus making dangerous deletions) it is IMHO important to stash helper files which don't have to do with this particular website.

And you can more easily prevent access by .htaccess e. g.

And a clean web directory (with two CMS files instead of 13) has less puzzling impact on the editors / administrators.

PhrozenByte commented 5 years ago

Thanks for the explanation, I think I understand what you're trying to do. However, I don't think that this approach is the best way to achieve what you're trying to do. How about adding Pico's .htaccess RewriteRules to your main /var/www/html/.htaccess (with adjusted paths of course)? You'll have to do this to enable URL rewriting anyway. It works without any change to Pico and furthermore allows you to keep your main httpdocs directory even cleaner, because you can keep Pico's index.php in the picocms subfolder.

PhrozenByte commented 5 years ago

Thank you for your contribution @jjtmp! :+1: However, as explained above, I think there's a better solution to achieve what you're trying to do. Thus I will close this now. If you have something to add, please don't hesitate to comment. @ALL, more feedback is still appreciated!