I’m preparing a site to became multilingual by renaming current "root" subsite.
("/2008" -> "/hr")
Problem is in the Apache rewrite rules for MODx freindly URLs
(a couple of rename tries noted *** below):
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
# Rename old folders
*** RedirectMatch 301 /2008/(.*) http://www.a-site.org/hr/$1
*** RewriteRule ^/2008/(.*)$ http://www.a-site.org/hr/$1 [R=301,L]
# Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.a-site\.org [NC]
RewriteRule (.*) http://www.a-site.org/$1 [R=301,L]
# Exclude /assets and /manager directories and images from rewrite rules
RewriteRule ^(manager|assets)/*$ - [L]
RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]
# For Friendly URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
First (RedirectMatch) command gives me unfriendly URL (?q=pagename) appended to rewritten address.
Second (RewriteRule) command still gives 404 error.
I’m out of ideas...