Hello,
I have a been building Modx sites for a while now, I use the same .htacess file (edited for each domain) and the Friendly URLs work wonderful. I’ve decided to start building sites under subdomains and have run into a few issues with the friendly URLs.
Ex. subdomain.domain1234.com
my current .htaccess looks like this
[tt]Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain1234.com [NC]
RewriteRule ^(.*)$
http://www.domain1234.com/$1 [L,R=301]
# For full documentation and other suggested options, please see
#
http://svn.modxcms.com/docs/display/MODx096/Friendly+URL+Solutions
# including for unexpected logouts in multi-server/cloud environments
# and especially for the first three commented out rules
#php_flag register_globals Off
#AddDefaultCharset utf-8
#php_value date.timezone Europe/Moscow
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]
# Rewrite domain.com -> www.domain.com -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
#RewriteRule (.*)
http://www.example.com/$1 [R=301,L]
# Exclude /assets and /manager directories from rewrite rules
RewriteRule ^(manager|assets) - [L]
# For Friendly URLs
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
# Reduce server overhead by enabling output compression if supported.
#php_flag zlib.output_compression On
#php_value zlib.output_compression_level 5
[/tt]
When i try to add the subdomain ( subdomain.domain1234.com ) in the .htacess nothing works (site is broken)
When the .htaccess is as it appears above everything works when I am under
http://subdomain.domain1234.com however nothing works when I am
http://www.subdomain.domain1234.com
What can I do so that when I type in the www.subdomain.domain1234.com it will redirect to subdomain.domain1234.com ?