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

modx not in webroot #20

Open
gyorgycsintalan opened this issue Sep 19, 2019 · 3 comments
Open

modx not in webroot #20

gyorgycsintalan opened this issue Sep 19, 2019 · 3 comments
Labels

Comments

@gyorgycsintalan
Copy link

gyorgycsintalan commented Sep 19, 2019

Greetings!

I would like to know how to configure LangRouter if MODX is installed to a subfolder on the webserver (for example: /modx/ ) ? I tried setting the context url settings (set base_url to /modx/) and also to modify RewriteBase to /modx2/ in .htaccess but it doesn't work. What can I do in this case? Thank you!

@Jako Jako added the question label Sep 20, 2019
@muzzwood
Copy link

This appears to be an issue with LangRouter that I just came across too. (Works perfectly when not in a subdirectory of course)
It actually does work for any resource that is not the site_start resource. When trying to load the resource set to site_start it loops endlessly and times out.

It can be fixed by adding the cultureKey to the base_url and removing it from the site_url.

For example the old base_url was /modx/ and I changed that to /modx/en/

The old site_url was {url_scheme}{http_host}{base_url}{cultureKey}/ and I changed that to {url_scheme}{http_host}{base_url}.

This is not a proper solution though as other functionality requires the base_url to not include the cultureKey (such as getting image urls) .

@Jako I had a go at fixing it, but no luck thus far.

@Jako
Copy link
Owner

Jako commented Nov 2, 2023

It was somehow a stupid decision to remove the cultureKey from the base_url during creating that extra.

SmartRouting and xRouting work the same and include the cultureKey in the baseUrl. I have to add that solution to the documentation.

@muzzwood
Copy link

Yeah turns out the fix works fine. 🎉 I just needed to add /modx/ to the phpthumbof.cache_url setting. Otherwise it would generate image urls with the cultureKey (since it uses the base_url as default).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants