<![CDATA[ [Hack] Subsites - (Solve Friendly Alias Path) - My Forums]]> https://forums.modx.com/thread/?thread=4473 <![CDATA[Re: [Hack] Subsites - (Solve Friendly Alias Path)]]> https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=13#dis-post-27864 andrnag May 29, 2009, 12:39 AM https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=13#dis-post-27864 <![CDATA[Re: [Hack] Subsites - (Solve Friendly Alias Path)]]> https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=13#dis-post-27863 Quote from: Andrey at May 27, 2009, 02:24 AM

@heimdall
Try to use this solution of multidomains. It reaaly simple and without core hacking.

I would love too but I don’t know how to adapt it for subdomains, I’m guessing it’s just some change in the .htaccess but what?]]>
heimdall May 28, 2009, 02:40 PM https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=13#dis-post-27863
<![CDATA[Re: [Hack] Subsites - (Solve Friendly Alias Path)]]> https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=13#dis-post-27862 Try to use this solution of multidomains. It reaaly simple and without core hacking.]]> andrnag May 26, 2009, 09:24 PM https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=13#dis-post-27862 <![CDATA[Re: [Hack] Subsites - (Solve Friendly Alias Path)]]> https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=13#dis-post-27861 Quote from: heimdall at May 26, 2009, 10:31 PM

Hi, thanks for the reply, is there any more news on when revolution will come out in beta. It is correct that revolution has subdomain/subsite support built into it via contexts?
Release time-line for Revolution is discussed in a multitude of places here in the forums recently, and yes, Revolution provides Contexts which will make it easier to support various multi-domain/sub-domain setups seamlessly.]]>
opengeek May 26, 2009, 06:08 PM https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=13#dis-post-27861
<![CDATA[Re: [Hack] Subsites - (Solve Friendly Alias Path)]]> https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=13#dis-post-27860 heimdall May 26, 2009, 05:31 PM https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=13#dis-post-27860 <![CDATA[Re: [Hack] Subsites - (Solve Friendly Alias Path)]]> https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=13#dis-post-27859 Quote from: heimdall at Apr 26, 2009, 02:30 PM

I was being a bit slow, I now know what you mean. I put the following into my .htaccess and it works great with the subdomains:
RewriteCond %{HTTP_HOST} ^www\.high-rollercasinos\.com$ [NC]
RewriteRule ^(.*)$ http://high-rollercasinos.com/$1 [R=301,L]

The only slight problem is that the main site now defaults to http://high-rollercasinos.com and I want it to be www.high-rollercasinos.com or does it not make any difference to seo/serps etc. Is this possible some how? Sorry if this is really obvious to everyone but I’m not so confident with redirects etc.
Just reverse it...
RewriteCond %{HTTP_HOST} ^high-rollercasinos\.com$ [NC]
RewriteRule ^(.*)$ http://www.high-rollercasinos.com/$1 [R=301,L]

...if you want the non-www. to go to www.

Quote from: heimdall at Apr 26, 2009, 02:30 PM

I alos have a slight problem in that the subfolders still form part of the address. E.g before I would have www.high-rollercasinos.com/Norsk/Poker-Rom etc and now I have no.high-rollercasinos.com/Norsk/Poker-Rom when what I want is no.high-rollercasinos.com/Poker-Rom i.e to strip away the subfolder part. Again I assume this is fairly easy but after trawling round the internet I’m just getting more andmore confused, please help.
I don’t believe that is possible in 0.9.x without hacking the core or writing some complex rewrite rules.]]>
opengeek May 26, 2009, 04:39 PM https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=13#dis-post-27859
<![CDATA[Re: [Hack] Subsites - (Solve Friendly Alias Path)]]> https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=13#dis-post-27858
Would really appreciate some answers, I’m really giving some serious thought to putting this onto a live site.]]>
heimdall May 26, 2009, 03:28 PM https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=13#dis-post-27858
<![CDATA[Re: [Hack] Subsites - (Solve Friendly Alias Path)]]> https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=12#dis-post-27857 Quote from: sal at Apr 23, 2009, 03:39 AM

Quote from: hquadrat at Apr 22, 2009, 10:43 PM

Mmmmh, I think since 0.9.6.3 the default MODx .htaccess includes a rewrite rule that always redirects either to the www. or the non-www subdomain for SEO reasons (google requested to decide for one or the other a while ago; a.f.a.i.c.r. for duplicate content issues).

Of course this behaviour collides with the subsites hack, you have to think of a solution before the subsites modification can work.
I’m sure that block is quoted out in the default .htaccess file but the best way round it if you wish to enable this (advised) is to only match "www" requests then redirect them to the non-www URL (this is probably how it works currently). If using only different domains rather than sub-domains, you can add several rules to tidy them all up.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.company1\.com$ [NC]
RewriteRule ^(.*)$ http://company1.com/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^www\.company2\.com$ [NC]
RewriteRule ^(.*)$ http://company2.com/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^www\.company3\.com$ [NC]
RewriteRule ^(.*)$ http://company3.com/$1 [R=301,L]

This rule is used for several parked domains I have which also have wildcard DNS set for them. For example, www.dearapp.com will be pushed to the non-www version, but oh.dearapp.com works fine.


I was being a bit slow, I now know what you mean. I put the following into my .htaccess and it works great with the subdomains:
RewriteCond %{HTTP_HOST} ^www\.high-rollercasinos\.com$ [NC]
RewriteRule ^(.*)$ http://high-rollercasinos.com/$1 [R=301,L]

The only slight problem is that the main site now defaults to http://high-rollercasinos.com and I want it to be www.high-rollercasinos.com or does it not make any difference to seo/serps etc. Is this possible some how? Sorry if this is really obvious to everyone but I’m not so confident with redirects etc.

BTW I have disabled it for now until I get an answer to the question but I can re-enable it if someone needs to check it out before helping me.


I alos have a slight problem in that the subfolders still form part of the address. E.g before I would have www.high-rollercasinos.com/Norsk/Poker-Rom etc and now I have no.high-rollercasinos.com/Norsk/Poker-Rom when what I want is no.high-rollercasinos.com/Poker-Rom i.e to strip away the subfolder part. Again I assume this is fairly easy but after trawling round the internet I’m just getting more andmore confused, please help.]]>
heimdall Apr 26, 2009, 09:30 AM https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=12#dis-post-27857
<![CDATA[Re: [Hack] Subsites - (Solve Friendly Alias Path)]]> https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=12#dis-post-27856
And how would I do this for subdomains please? I have 7 subdomains is that possible, also is there any point doing this now or should I wait for the revolution, when is it due out?

Also a bit confused about the subdomains, do I need to register them to be able to park them or is it better to add then as subdomains and point them at the root folder?]]>
heimdall Apr 23, 2009, 03:51 PM https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=12#dis-post-27856
<![CDATA[Re: [Hack] Subsites - (Solve Friendly Alias Path)]]> https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=12#dis-post-27855 Quote from: hquadrat at Apr 22, 2009, 10:43 PM

Mmmmh, I think since 0.9.6.3 the default MODx .htaccess includes a rewrite rule that always redirects either to the www. or the non-www subdomain for SEO reasons (google requested to decide for one or the other a while ago; a.f.a.i.c.r. for duplicate content issues).

Of course this behaviour collides with the subsites hack, you have to think of a solution before the subsites modification can work.
I’m sure that block is quoted out in the default .htaccess file but the best way round it if you wish to enable this (advised) is to only match "www" requests then redirect them to the non-www URL (this is probably how it works currently). If using only different domains rather than sub-domains, you can add several rules to tidy them all up.
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.company1\.com$ [NC]
RewriteRule ^(.*)$ http://company1.com/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^www\.company2\.com$ [NC]
RewriteRule ^(.*)$ http://company2.com/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^www\.company3\.com$ [NC]
RewriteRule ^(.*)$ http://company3.com/$1 [R=301,L]

This rule is used for several parked domains I have which also have wildcard DNS set for them. For example, www.dearapp.com will be pushed to the non-www version, but oh.dearapp.com works fine.
]]>
sal Apr 22, 2009, 10:39 PM https://forums.modx.com/thread/4473/hack-subsites---solve-friendly-alias-path?page=12#dis-post-27855