Closed Lesik closed 9 years ago
I'm unable to reproduce this.
$config['content_dir'] = 'content-sample';
line and changed it to $config['content_dir'] = 'content';
config.php.template
file to config.php
content-sample
dir to content
I have a feeling you didn't rename the config.php.template
to config.php
for the changes to take effect. If this doesn't resolve your issue; please provide more details, and I will assist you further.
Edit: I've changed the wording to more explicitly state how to override the default settings in the config.php.template
file. Commit: 5744a5650ab73129611f357d7b995f085a79e433
Oh man, I'm sorry. I didn't notice content_dir
was already set in the config.php
, so I set it twice.
Yes, I did rename config.php.template
, I'm not quite that stupid ;-)
Sorry, my bad, no issue here.
I face a different issue though, I can't access any files in the subdirectories, for example /sub.
If you want another page within the sub folder, simply create a text file with the corresponding name (e.g. content-sample/sub/page.md) and will be able to access it from the URL http://yoursite.com/sub/page.
Doesn't work for me, I just get a blank page. Tried setting chmod to 777, didn't help. Should I open a different issue for that?
Sorry, @Lesik ,
Again, I'm unable to reproduce that issue. Have a look at my test.
A blank page usually means you have error reporting suppressed in your php.ini
or .htaccess
Check the servers' error log and respond with the message it is giving.
And again this issue was my fault. I'm starting to feel embarrassed. I though I copied the .htaccess file when transferring my local folder to the server, but because "hidden files" were turned off, Nautilus (my file manager) didn't copy that file over.
6. That's it. Tweak the .htaccess file if required.
With the default .htaccess (from this repo) I get a 500 server error accessing /sub. Could you share your .htaccess for comparison?
This is the one my test case is using, just the default .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]
</IfModule>
# Prevent file browsing
Options -Indexes
Depending on your setup, you could try using RewriteBase
I have the same one. I get this error when accessing /sub:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
I don't have SSH access on my server, just SFTP (German hoster 1und1.de), so can't check logs. Any idea what could be wrong anyways..? :(
I'm not familiar with the host, and It's hard for me to say. I know that 500 errors are typical of a .htaccess
misconfiguration. :stuck_out_tongue_winking_eye:
phpinfo();
and make sure the server configuration is proper. If nothing else, try submitting a ticket to your host. It could be a misconfiguration of their Apache install, who knows? Having access to the log file could give you crucial information.
RewriteBase
?phpinfo();
results in a giant output, what should I look for?I know how difficult it is to deal with inexperienced people, thanks for having patience with me. Webdev isn't my field, I just want to host my Java projects with a simple CMS.
It's no problem. I'm no master myself, and this helps me just as much as it helps you.
644
& folders: 755
. RewriteBase /
<- notice the trailing /
right after RewriteEngine On
and see if that fixes things, if not, revert. mod_rewrite
listed under Loaded Modules
? This also provides you with a lot of information on how the server is configured, and what mods/extensions are available to use. Shared hosting can be tricky.Have you tried this in a local environment?
You may get more information from these issues as well: #100, #22
RewriteBase /
did it, thanks. I wonder what the value of RewriteBase was before, shouldn't /
be default? Anyways, thanks for your help :)
Happy Pico'ing! :+1:
Hey, I would like to config Pico to use some other folder for content. I found in https://github.com/picocms/Pico/pull/211 that
content_dir
contains the content directory. Though setting$config['content_dir'] = 'content';
does not seem to do the trick (I only see the menu, no content).Also, this is undocumented, at least I found nothing on the docs. It's important in my opinion, would add an official way of changing the directory name, as different people use different folder structures to organize their servers.