-
Notifications
You must be signed in to change notification settings - Fork 127
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
Force language segment (preVar) #28
Comments
Thanks for the report! I guess it can be related to the valueDefault use. Previous version of RealURL used separate caches for encoding and decoding. So your visitors could come to the site using /foo/bar but the proper generated link os /fr/foo/bar/. Due to different caches incoming and generated links could be different. Newer versions use the same cache, so if users come through /foor/bar, encoding will also return /foor/bar. On one hand such behavior helps to prevent duplicate content. On the other hand it is not consistent with previous behavior. This is just an idea. I will investigate and see what can I do about it. Probably, I should change handling of valueDefault to a redirect but I am not sure yet. Thanks a lot for testing and reporting! |
Thanks for your answer. I actually found a way around this, which seems correct to me and doesn't imply any changes in RealURL (although it does mean a change of behaviour, as you mention). If I force the setting of the "L" GET variable using the following TypoScript:
all my links include the language segment in the default language. |
Note for myself: needs documentation! |
Documentation is done, closing the issue. |
Sorry to post here, but i have a bit of trouble with this. Thanks. |
Use rewrites (mod_rewrite for Apache or nginx rewrites). You can always check if language segment is included or not and 301-redirect accordingly. |
Redirect URLs without language prefix. Might be useful to document this somewhere:
|
I'm trying out RealURL 2.0 with TYPO3 7 (7.6.3-dev to be precise).
My RealURL config is here: https://gist.github.com/fsuter/a96c09c5d8ad1e4b13ac
When using RealURL 1.x and TYPO3 6.2 I could make it so that my URLs always included the language segment, even in the default language. With RealURL 2.0, this is no longer true. The URLs in the default language dont' have the language segment (which would have been "fr" in my case). Is something wrong with my configuration?
I did some debugging with Xdebug and it seemed to me that "fr" was always added while going through
\DmitryDulepov\Realurl\Encoder\UrlEncoder::encodeUrlParameterBlockUsingValueMap()
but then it does not appear in the typolinks anymore.URLs to translations have proper language segments.
The text was updated successfully, but these errors were encountered: