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

login URL doesn't work on local setup #18

Closed
vemman opened this issue Jan 11, 2017 · 3 comments
Closed

login URL doesn't work on local setup #18

vemman opened this issue Jan 11, 2017 · 3 comments
Assignees

Comments

@vemman
Copy link

vemman commented Jan 11, 2017

@robiso
I liked the demo very much, so installed on local machine to play around.

On windows machines admin url is malformed
Instead of http://localhost/works/wondercms/loginURL I get http://localhostd/Works/wondercms/loginURL

I believe even if my work was inside apache's htdocs, I will still see the drive letter

Windows Setup
Apache 2.4, PHP7 > in C drive
My works are under D:\works\work_sub_folder

My Solution

I replaced INC_ROOT in function url with this dirname($_SERVER['SCRIPT_NAME'])

public static function url($location = null) { return (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].str_replace($_SERVER['DOCUMENT_ROOT'], '', str_replace('\\', '/', INC_ROOT))."/{$location}"; }

@robiso robiso self-assigned this Jan 14, 2017
@robiso
Copy link
Collaborator

robiso commented Jan 14, 2017

@vemman thank you for reporting this, we'll check it out and reply back shortly.
I also changed this issue title from "admin URL not proper" to "login URL doesn't work on local setup" for clarity.

@robiso robiso changed the title admin URL not proper login URL doesn't work on local setup Jan 14, 2017
@robiso
Copy link
Collaborator

robiso commented Jan 29, 2017

@vemman, to ensure we don't break functionality - as this solution hasn't been tested widely, we'll add a documentation link for cases like this.

Thanks for reporting and finding a solution.

@robiso
Copy link
Collaborator

robiso commented Jan 30, 2017

Added this solution to our new wiki. https://github.com/robiso/wondercms/wiki/URLs-mailformed-on-Windows-IIS

Closing as we have a solution posted at the above link. Thanks @vemman!

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

No branches or pull requests

2 participants