Please Help
I need to set this up with one main domain www.high-roller-test.com and 7 subdomains; de.high-roller-test.com, es.high-roller-test.com, no.high-roller-test.com, fr.high-roller-test.com, it.high-roller-test.com, nl.high-roller-test.com and pt.high-roller-test.com
At the mement I can’t even get this to work on my main domain :-(.
I am running this all through xampp on my local PC and I have the following in my local hosts file:
127.0.0.1 localhost
127.0.0.1 www.high-roller-test.com
127.0.0.1 high-roller-test.com
127.0.0.1 de.high-roller-test.com
127.0.0.1 es.high-roller-test.com
127.0.0.1 no.high-roller-test.com
127.0.0.1 fr.high-roller-test.com
127.0.0.1 it.high-roller-test.com
127.0.0.1 nl.high-roller-test.com
127.0.0.1 pt.high-roller-test.com
the following in my apache config file:
<VirtualHost *>
ServerName www.high-roller-test.com
DocumentRoot "C:/Program Files/xampp/xampp/htdocs"
</VirtualHost>
<VirtualHost *>
ServerName de.high-roller-test.com
DocumentRoot "C:/Program Files/xampp/xampp/htdocs"
</VirtualHost>
<VirtualHost *>
ServerName es.high-roller-test.com
DocumentRoot "C:/Program Files/xampp/xampp/htdocs"
</VirtualHost>
<VirtualHost *>
ServerName no.high-roller-test.com
DocumentRoot "C:/Program Files/xampp/xampp/htdocs"
</VirtualHost>
<VirtualHost *>
ServerName fr.high-roller-test.com
DocumentRoot "C:/Program Files/xampp/xampp/htdocs"
</VirtualHost>
<VirtualHost *>
ServerName it.high-roller-test.com
DocumentRoot "C:/Program Files/xampp/xampp/htdocs"
</VirtualHost>
<VirtualHost *>
ServerName nl.high-roller-test.com
DocumentRoot "C:/Program Files/xampp/xampp/htdocs"
</VirtualHost>
<VirtualHost *>
ServerName pt.high-roller-test.com
DocumentRoot "C:/Program Files/xampp/xampp/htdocs"
</VirtualHost>
I have added the tamplate variable host_url and added it to the relevant templates
I have added the snippet http_host
I have added and activated the plugin multisite
I have put the following in each of the templates, "<base href="http://[!http_host!]/" />"
I have created a folder under root in MODX called www.high-roller-test.com which has an alias and host_url value of high-roller-test-com
I have put the following in my .htaccess:
#Options +FollowSymlinks
RewriteEngine On
RewriteBase /
###
# First be sure to rewrite the request to a unique domain
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} ^high-roller-test\.com [NC]
RewriteCond %{HTTP_HOST} !^www\.high-roller-test\.com [NC]
RewriteRule (.*)
http://www.high-roller-test.com/$1 [R=301,L]
# rewrite the homepage of each domain to index.html
RewriteRule ^high-roller-test-com\.html$ /index.html
# do the other magic: Rewrite the the requests to for MODx readable folders
RewriteCond %{HTTP_HOST} high-roller-test\.com [NC]
RewriteCond %{REQUEST_URI} !^/manager
RewriteCond %{REQUEST_URI} !^/images
RewriteCond %{REQUEST_FILENAME} index\.php [OR]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(index\.(html?|php)|high-roller-test-com)?(.*)$ index.php?q=/high-roller-test-com/$3 [L,QSA]
# The Friendly URLs part for the rest (or the main domain)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
So what am I doing wrong becuase it isn’t working? I can get the frongpage but none of the internal pages, also I would really appreciate someone telling me exactly what I need to put into the .htaccess file to add my subdomains.