0

I have several areas of my website which content authors want they content to be available at their own domain name for identity and advertising reasons. I want to avoid setting up additional multisites as most of these are very small subsections of the much larger parent site.

For example, the current url for a subsection wanting their own domain would look like this...

http://domain.com/section/subsection/category/thisismysite

the content users want to be able to access the site at

http://thisismysite.com

The major issues come when I want to keep the url short for additional subpages within the "thisismysite" sub section, say...

http://thisismysite.com/about would be the same as http://domain.com/section/subsection/category/thisismysite/about

Any ideas on how i can accomplish this for my users?

1

few months ago I had similar work to do, I had tried many (many) solutions and rewrite hacks but I'm not a htaccess guru and I was almost ready to drop it, but then I remembered I can park domains on my package and once domain is directed to your site, you can do with it something.

So, what I have in my htaccess rules for removing index.php and later I have few lines that handle new domain request. You must have that other domain for testing, besides that iys hard to know if will work.

RewriteEngine On
RewriteBase /

#Classic index.php remove
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]

#get request from new domain and rewrite destination
#maybe you can do something different, but this worked for me
RewriteCond %{HTTP_HOST} ^(www.)?thisismysite\.com$ [NC]
RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{DOCUMENT_ROOT}/$1 -f
RewriteRule ^(.*)$ /section/subsection/category/thisismysite/$1 [L]

If this doesn't work for you (even I had almost exact requirements as you), maybe you can play around this solution.

| improve this answer | |
  • This is close, I will continue to play with it and see if I can get a solution, thanks for posting. – Mike McBrien May 1 '13 at 2:33
  • Ok, I hope it helps you get it to what you need. – Davor Peic May 1 '13 at 14:26
  • Di you found a solution to your problem @MikeMcBrien ? – Davor Peic May 8 '13 at 14:29
0

I had the same problem and somebody had a solution for me. I think it will be useful for you too. This free add-on is called Freeway. Then you can just map up the desired URL with the actual URL like this:

section/subsection/category/thisismysite/{{entry}} => {{entry}}

Then people will be able to visit /about and EE will treat it as if they visited section/subsection/category/thisismysite/about and use the appropriate template_group/template.

| improve this answer | |
  • Will this work with multiple domains? – Mike McBrien Apr 26 '13 at 20:14
  • 1
    Unfortunately, no. This add-on supports no MSM (Multi Site Manager). – user1292 Apr 26 '13 at 20:27
  • Well that kinda takes that out of the mix for me - thanks for the info. – Mike McBrien Apr 26 '13 at 20:28
  • I am sorry. This was the only solution I knew that might help. On the other side, take a look at the ExpressionEngine Community Forums to see if somebody had the same issue and might have a solution. Or look at possible better add-ons at Devot:ee that are compatible with multi domains. Or await another solution here at this topic on this forum. – user1292 Apr 26 '13 at 20:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.