Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for subsites and index page #11

Closed
wants to merge 1 commit into from
Closed

Added support for subsites and index page #11

wants to merge 1 commit into from

Conversation

TheMaaarc
Copy link

This fix solves the Problems from Issue #7.

Pico Version: 0.8


protected function getFile($file_url) {
// Check if index.md
if($file_url == "/") {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my case, $file_url is something like http://localhost:8080/sub/page.
Replacing this:

if($file_url == "/") {
    $file_url = 'index';
}

with this:

$file_url = parse_url($file_url, PHP_URL_PATH);
if (substr($file_url, -1) == '/') {
    $file_url .= 'index';
}

fixed the problem.

@TheMaaarc TheMaaarc closed this Jul 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants