Skip to content

Issue with alias redirect when blog is hosted in a different base path #16

@sunandchakradhar

Description

@sunandchakradhar

When the blog is hosted in a path like http://localhost/blog/ There is an issue with alias redirect.
In the function create_alias you are adding a slash in the beginning when it is a local path and it is making the path absolute which is wrong. i,e. it redirects user to http://localhost/:slug instead of http://localhost/blog/:slug .

I suggest either to remove the slash in the beginning or to construct destination with complete URL like below.

def article_url(page):
    site_url = page.settings['SITEURL']
    return quote(('%s/%s' % (site_url, page.url)).encode('utf-8'))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions