Hi,
I am using MODX for my main site, but as the hosting offers unlimited add-ons domains I have installed two other MODxs inside their respective directories.
My site is
[tt]./ The main site
./assets "
./manager "
/domain1 A new domain with MODX
/domain1/assets
/domain1/manager
/domain2 The second domain with MODX
/domain2/assets
/domain2/manager[/tt]
I am trying to use Friendly URLs in all of them. So far its only working for the main site...
In the .htaccess located in the / level the relevant content is
[tt]
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]
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} ^maindomain\.com [NC]
RewriteRule ^(.*) http://www.maindomain.com/$1 [R=301,L]
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} ^domain1\.com\.ar [NC]
RewriteRule (.*) http://www.domain1.com.ar/$2 [R=301,L]
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} ^domain2\.com\.ar [NC]
RewriteRule (.*) http://www.domain2.com.ar/$2 [R=301,L]
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTP_HOST} !^domain1\.com\.ar [NC]
RewriteCond %{HTTP_HOST} !^www\.domain1\.com\.ar [NC]
RewriteCond %{HTTP_HOST} !^domain2\.com\.ar [NC]
RewriteCond %{HTTP_HOST} !^www\.domain2\.com\.ar [NC]
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA][/tt]
And the configuration in the manager is (for all sites)
Use friendly URLS, yes
prefix, none (blank)
suffix, .html
use friendly aliases, yes
use friendly alias path, no
allow duplicate aliases, no
automatically generate aliases, no (all pages have aliases still)
The .htaccess in the domain1 has
[tt]#Options +FollowSymlinks
#RewriteEngine On
RewriteBase /domain1/
# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.domain1\.com\.ar [NC]
RewriteRule (.*) http://www.domain1.com.ar/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA][/tt]
(Second site configuration is equal).
Like I said, the mainsite works perfectly. All links nice and everything looks fine.
The domain1 and domain2 sites works only for the main page (though it looks like .htaccess is not properly working, since if I enter domain1.com.ar instead of www.domain1.com.ar the page loads, but with no "www." completion).
On this site when I try to access to any of the links, I get a 404 error.
Any thoughts on this?? Is it possible to do nested installs of MODx or I am just loosing my time?
Thanks a lot!
Juan