I want to configure a Drupal 7 site using a domain and two subdomains with a single database.
domain.com
sub1.domain.com
sub2.domain.com
I am using Domain Access module for sharing content on these subdomains. I want to share some content and to be able to modify some content on each subdomain. The modified content must be viewed only on its subdomain (for example, a different image should appear on each subdomain).
The question is:
How can I share content between subdomains and also differentiate some content?
I tried different approaches, I modified the user's permissions and it is still not solving my problem.
I published a Basic Page on a subdomain and I can access this page from every subdomain, even if I unchecked the option "Send to all affiliates"
If I change the content from a page published on sub1.domain.com, that content appears modified everywhere
If I create a user or admin for a subdomain, he is able to login everywhere and I do not want that
Since you already can publishing in all domains and those changes are visible in all domains, I guess that you have the domains already well configured. This is, all domains pointing to the same Drupal project and using the same database.
So, you have three different questions:
DIFFERENTIATE THE CONTENT FROM EACH DOMAIN:
Assuming that you have the domains well configured, and the domain access module is installed correctly, you can publish to a specific domain by selecting which domain to publish the Basic Page, a domain access option now available.
(Be sure to test that with an user without permissions to see content from all domain - like the administrator).
CHANGE CONTENT FROM A DOMAIN AND AFFECT ONLY THAT DOMAIN:
If the content was published only to a specific Domain it should change only on that specific domain. The trick here is to have a different Theme for each Domain and make the change on the Theme corresponding to the subdomain you want to change.
USERS CAN ACCESS ANY SUBDOMAIN:
To control this you have to assign a domain to each user, go to admin/user and there under the AFFILIATE EDITOR OPTIONS tab, you can assign domains to users. (user's registered before the Domain Access module was installed doesn't have an associated domain).
Related
My project has a WordPress landing page hosted on Siteground and prototype running on Google App Engine. I would like the naked domain newco.com to point to the WordPress/Siteground page and the prototype app.newco.com to be served by GAE.
The app also has a server of course. To get the security working correctly, we need both server and client running on the same domain name. I followed the Mapping Custom Domain guide for GAE, which has the following instructions
In A or AAAA records, enter #
In CNAME records, enter a third-level domain name. For example, enter www to map the www.example.com subdomain.
Siteground support told me that, if I want the naked domain to point to the site they are hosting, I need to have a single A record with # reference. This conflicts directly with the instructions mentioned above. Having both the A/AAAA records and the single A Siteground record all referencing # leads to unstable results for both the app and the WordPress site.
Does anyone know how to set up the GAE custom domain while still having the naked domain name point to an external site?
I currently have a website up and running that is my freelancing website. What I wanted to do was create a testing subdirectory on the website.
So for example my site would be:
website.com
I want the testing site to be: website.com/test
I need this test to be private and require a password to view, as well as be a different installation of wordpress so I can manipulate it without editing my main website. Is this possible? Currently I have created a test directory from the cPanel that requires a password but it just brings me to a 404 not found page.
I would also like to create more, public, instances that I can use as a portfolio until I get more real clients. So for example I would like to have my site be: website.com/themeOne
Is any of this possible, or am I out of luck? Please let me know I would greatly appreciate any help. Anything I found found online thus far has either not been relevant or has not worked.
You can achieve this by setting up a wordpress multisite installation. I currently use this to host all my clients.
Will work like this.. Main site is website.com
Depending on how long you have had that site set up will determine whether your multisite install will be a subdirectory or a subdomain. If you have had your main site for a while it will be subdomains. ie. xyz.website.com
You will have to set up a wild card subdomain on your server though...so keep that in mind.
Here is the documentation on setting up a wordpress multisite
https://premium.wpmudev.org/blog/ultimate-guide-multisite/
You can install as many WordPress instances as you like in subfolders example.com/test/ or subdomains test.example.com in one hosting account; see http://codex.wordpress.org/Installing_Multiple_Blogs. (You are, of course, limited if your host does not support subdomains. And you may find lots of sites with lots of traffic will slow your whole hosting account.)
For these separate WordPress installs, you can use the same database; simply give each WordPress install a different database table prefix in wp-config.php. https://codex.wordpress.org/Editing_wp-config.php Or, give them all the installs a totally different databases, only limited by your hosting account.
To control access to a WordPress site, there is no need for access control in .htaccess or via Cpanel; use any one of a number of plugins that allow you to restrict access to anyone not logged into WordPress. See https://wordpress.org/plugins/search.php?type=term&q=password
And you can still control the user's role when they are logged into the site with one of those plugins, i.e. editor, administrator, etc., from within WordPress. That's because you want to give a client a Subscriber user level so they can simply login and view the site, rather than Administrator, who can see posts, plugins, etc. See https://codex.wordpress.org/Roles_and_Capabilities
There is no need for WordPress Multisite, unless you want to go that way: see https://codex.wordpress.org/Create_A_Network But be aware that MS requires more server and DNS configurations if you want to use Domain Mapping: https://wordpress.org/plugins/wordpress-mu-domain-mapping/
I have a multisite wordpress install at plataforma.vendamais.pt
And I have a wildcard for *.plataforma
So all new sites created have this url:
client01.plataforma.vendamais.pt
client02.plataforma.vendamais.pt
and so on.
I need to connect my client's domains to the correspondent website, so the url client01.plataforma.vendamais.pt wont be visible.
As a real case, I have a client's website here:
www.tancredoferrari.plataforma.vendamais.pt/
I need to have his domain tancredoferrari.pt pointing to that address, so his clients will navigate using tancredoferrati.pt and wont see any of the www.tancredoferrari.plataforma.vendamais.pt url.
Is it possible?
There's 2 options here:
Option 1
An CNAME record on the live domain's DNS should be sufficient to do this - so long as you're happy that the resource requests (images, scripts, styles and so forth) behind the scenes are going to the staging domain URLS (client02.plataforma.vendamais.pt and so forth).
Option 2
Check out the wordpress plugin WordPress MU Domain Mapping. With that you can map the site to multiple domains (and set the primary), which is a better approach.
I'm not sure if this is possible or what, I just thought about it.
I have a page in my site www.mysite.com/thispage
I want to change the whole URL of that page.
www.mysite.com/thispage to www.thispage.com without transfering and configuring another set of files and databases.. My site is in wordpress. Is this possible?
Sure - depending on your hosting settings. You can buy the domain name "thispage.com" and then ask your hosting company to set it up to be hosted in the folder "thispage".
Just a heads up - usually hosting companies charge more to host a domain name like this (or host multiple domain names).
Then you'll need to edit the settings within Wordpress to reflect the new domain name (under SETTINGS).
I user drupal 7 to build a site that users can customise their user profile page.
Then i use pathauto to rewrite the url alias to mydrupalsite.com/user/username.
what i want to do next is:
If a user get his own domain name such as www.username.com and point it to my server, how can I redirect www.username.com to mydrupalsite.com/user/username.
can i use WHM to do it or i need to modify .httaccess file?
Thanks a lot!
Server-side setup is a must. So setup your server to point all requests to any domain, to base of the Drupal site.
For an example, if your drupal site is example.com, example.net and example.org should point to the base domain. As you have cPanel, it's similar to "parking" example.net and example.org in example.com's public root.
Then, depending on your need, you have 2 choices. subdomain module or Domain Access module.
Subdomain module is almost for your use-case and it creates subdomains for each user and it can handle bootstrap depending on requested domain.
Domain Access, is actively developing and you can use the (pre-release) Domain User module to assign domains automatically. But Domain Access module itself comes with many useful sub-modules and integrates with [Rules][4] module to do the redirection.
But none of these are "pretty" way to do your exact usecase.
You could modify the Subdomain module to suit your needs such as integrating with WHM to create domain parking, etc.
There are many cPanel integrations for Drupal but I don't know much about them.