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

Don't work if ProcessWire is installed in a subdirectory #11

FlipZoomMedia opened this issue Jan 9, 2014 · 1 comment


None yet
1 participant
Copy link

commented Jan 9, 2014

There is no Sitemap generated when ProcessWire is installed in a subfolder relative to the root directory. For example:

If PW is installed in direct root: - works

If PW is installed in the subdirectory: - does not work; trigger a 404

The problem is on line 42 in the MarkupSitemapXML.module.

$startpage = $this->sanitizer->path(dirname($_SERVER['REQUEST_URI']));

The variable $startpage returns "/2013-processwire/" instead of "/".

Best regards,


This comment has been minimized.

Copy link
Contributor Author

commented Jan 9, 2014

Should solve the problem.

replace line 42

$startpage = $this->sanitizer->path(dirname($_SERVER['REQUEST_URI']));


$startpage = str_ireplace(trim(wire('config')->urls->root, '/'), '', $this->sanitizer->path(dirname($_SERVER['REQUEST_URI'])));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.