Comments (7)
Redirect URLs without language prefix. Might be useful to document this somewhere:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/([a-z]{2})/(.*)$
RewriteRule ^(.*)$ /en/$1 [L,R=301]
RewriteRule ^$ /en/ [L,R=301]
from typo3-realurl.
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:
config {
defaultGetVars {
L = 0
}
}
all my links include the language segment in the default language.
from typo3-realurl.
Sorry to post here, but i have a bit of trouble with this.
I have it working that all links get the language part included, however they are still accessible without that part. And for google this means its duplicate content. Is there any way to disallow accessing it without the language part? Using Realurl 2.0
Thanks.
from typo3-realurl.
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!
from typo3-realurl.
Note for myself: needs documentation!
from typo3-realurl.
Documentation is done, closing the issue.
from typo3-realurl.
Is there any way to disallow accessing it without the language part?
Use rewrites (mod_rewrite for Apache or nginx rewrites). You can always check if language segment is included or not and 301-redirect accordingly.
from typo3-realurl.
Related Issues (20)
- Probably superfluous database query upon banUrlsRegExp requests HOT 1
- alias_field is saving IF(path_segment!='',path_segment,title) as string in the DB (tx_news) HOT 2
- unique_alias not updated to records without l10n_parent HOT 1
- different rootPageIds in query param
- Wiki: Scheduler suggestion outdated HOT 1
- PHP 7.3 compatibility HOT 5
- Documentation on on wiki.typo3.org HOT 1
- TYPO3 6.2: Default logging cannot be overwritten in AdditionalConfiguration.php
- Registered hooks are unset when auto conf is generated HOT 2
- PHP 7.3 support HOT 5
- TYPO3 7.6 remove trailing slash from speaking_url HOT 2
- XML codes at website home HOT 1
- ext_emconf.php 2.6.1 is not written well!! HOT 7
- tx_realurl_uniqalias not beeing updated HOT 1
- PHP 7.4 compatibility HOT 1
- option to disable fileName 'print' HOT 1
- Because pathdata.pid is on the pages.uid now non-admins can not delete any page with pathdata on it HOT 2
- Extension key "realurl" is NOT loaded! HOT 3
- 404 because of pid 0 in tx_realurl_urldata HOT 1
- Configuration not loaded correctly
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from typo3-realurl.