Hi,
I have almost finish my next website based on Modx and I have one problem.
This is two-languages site with pl/en translation. I used Babel Extras for translation and from tutorial I added two contexts (Polish, English) Set everything and also added in .htaccess
# The Friendly URLs part
# detect language when requesting the root (/)
#RewriteCond %{HTTP:Accept-Language} !^en [NC]
RewriteRule ^pl?/$ pl/mapa/ [R=301,L]
RewriteRule ^en?/$ en/map/ [R=301,L]
# redirect all requests to /en/favicon.ico and /de/favicon.ico
# to /favicon.ico
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(pl|en)/favicon.ico$ favicon.ico [L,QSA]
# redirect all requests to /en/assets* and /de/assets* to /assets*
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(pl|en)/assets(.*)$ assets$2 [L,QSA]
# redirect all other requests to /en/* and /de/*
# to index.php and set the cultureKey parameter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(pl|en)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]
All correct urls are working but also I want to handle wrong urls and redirect them to Error 404 page. But with thesse settings Page Error 404 works only when I'm trying url without pl or en i.e.
/qwerty -> redirect to 404 Page
/asdf -> redirect to 404 Page
but this:
/plqwerty -> redirect to blank 503 Error Page not found
/enasdf -> redirect to blank 503 Error Page not found
How I should change htaccess to redirect all wrong urls to Error 404 Page?
Thanks.