Restricting pages to attached domain

Permalink Browser Info Environment
Is there a way to restrict pages to be visible only via the attached domain?

Type: Discussion
Status: Resolved
View Replies:
Mainio replied on at Permalink Reply
Mainio
By default, all the pages under the mapped site should be only accessible through the domain that is mapped to their domain home page. Other domains should not show the page through the same addesses.

If you mean that you are using the "allow from all domains" attribute for some page and would like to allow that only to specific domains, unfortunately this is not a feature of this add-on.

Of course, this is always possible through custom code.

Antti / Mainio
tolja replied on at Permalink Reply
Oh, right.
I was using an unmapped domain to access pages and that got me unwanted results.
After mapping all of my domains pages seem to be properly restritcted.

However, I need to set viewing permission to private on the main site and that setting propagates to other domains too. Is there a way to set the main domain to private and subdomains public without htaccess trickery?
Mainio replied on at Permalink Reply
Mainio
I would suggest having a parent page in the sitemap for all your mapped sites. This way you could also restrict access through the concrete5 permissions easily:

- Set the restricted permissions on the root page level
- Set public permissions on the "mapped sites" parent page

By default, all pages in concrete5 are set to inherit their permissions from their parent page if the permissions haven't been modified for that page. So, after such setup all your root level pages should be restricted and all the pages under "mapped sites" would be publicly accessible.
tolja replied on at Permalink Reply
That was easy indeed and all is well.
Thanks.
tolja replied on at Permalink Reply
Except I can still access a page under a mapped site using the main domain without logging in.
Login prompt is visible only on the root level.
Mainio replied on at Permalink Reply
Mainio
Oh yeah, this is very true.

I think this might be good improvement in the add-on but for now as a quick fix, I think the htaccess is the easiest way to avoid this.

In the version for 5.6 we had a feature that forced these pages to be served from their correct domains but for some reason (I cannot remember at the moment) we decided to drop this off from this version.

We'll take this on the table and think whether it would make sense to add it back.
Mainio replied on at Permalink Reply
Mainio
This feature is now available in the latest version of the add-on 2.3.0.

You can find it under the common settings of the add-on (other one of the redirection settings). For new installations, this setting is enabled by default but for old installation, it needs to be manually enabled.

concrete5 Environment Information

# concrete5 Version
Core Version - 5.7.5.6
Version Installed - 5.7.5.6
Database Version - 20151221000000

# concrete5 Packages
Multiple Domains (2.2.0).

# concrete5 Overrides
languages/es_PY/LC_MESSAGES/messages.mo, languages/es_PY/LC_MESSAGES, languages/es_PY, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/pl_PL/LC_MESSAGES/messages.mo, languages/pl_PL/LC_MESSAGES, languages/pl_PL, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/nb_NO/LC_MESSAGES/messages.mo, languages/nb_NO/LC_MESSAGES, languages/nb_NO, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR, languages/es_PY/LC_MESSAGES/messages.mo, languages/es_PY/LC_MESSAGES, languages/es_PY, languages/da_DK/LC_MESSAGES/messages.mo, languages/da_DK/LC_MESSAGES, languages/da_DK, languages/tr_TR/LC_MESSAGES/messages.mo, languages/tr_TR/LC_MESSAGES, languages/tr_TR, languages/fi_FI/LC_MESSAGES/messages.mo, languages/fi_FI/LC_MESSAGES, languages/fi_FI, languages/it_IT/LC_MESSAGES/messages.mo, languages/it_IT/LC_MESSAGES, languages/it_IT, languages/de_DE/LC_MESSAGES/messages.mo, languages/de_DE/LC_MESSAGES, languages/de_DE, languages/nl_NL/LC_MESSAGES/messages.mo, languages/nl_NL/LC_MESSAGES, languages/nl_NL, languages/ru_RU/LC_MESSAGES/messages.mo, languages/ru_RU/LC_MESSAGES, languages/ru_RU, languages/pl_PL/LC_MESSAGES/messages.mo, languages/pl_PL/LC_MESSAGES, languages/pl_PL, languages/fr_FR/LC_MESSAGES/messages.mo, languages/fr_FR/LC_MESSAGES, languages/fr_FR, languages/sv_SE/LC_MESSAGES/messages.mo, languages/sv_SE/LC_MESSAGES, languages/sv_SE, languages/el_GR/LC_MESSAGES/messages.mo, languages/el_GR/LC_MESSAGES, languages/el_GR, languages/nb_NO/LC_MESSAGES/messages.mo, languages/nb_NO/LC_MESSAGES, languages/nb_NO, languages/ja_JP/LC_MESSAGES/messages.mo, languages/ja_JP/LC_MESSAGES, languages/ja_JP, languages/pt_BR/LC_MESSAGES/messages.mo, languages/pt_BR/LC_MESSAGES, languages/pt_BR

# concrete5 Cache Settings
Block Cache - On
Overrides Cache - On
Full Page Caching - Off
Full Page Cache Lifetime - Every 6 hours (default setting).

# Server Software
Apache/2.4.7 (Ubuntu)

# Server API
apache2handler

# PHP Version
5.5.9-1ubuntu4.14

# PHP Extensions
apache2handler, bcmath, bz2, calendar, Core, ctype, curl, date, dba, dom, ereg, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, imagick, imap, ionCube Loader, json, libxml, mbstring, mcrypt, memcache, mhash, mysql, mysqli, openssl, pcre, PDO, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, Phar, posix, readline, Reflection, session, shmop, SimpleXML, soap, sockets, SPL, sqlite3, standard, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xdebug, xhprof, xml, xmlreader, xmlwriter, Zend OPcache, zip, zlib.

# PHP Settings
max_execution_time - 600
log_errors_max_len - 1024
max_file_uploads - 20
max_input_nesting_level - 64
max_input_time - 60
max_input_vars - 3000
memory_limit - 512M
post_max_size - 8M
sql.safe_mode - Off
upload_max_filesize - 2M
memcache.max_failover_attempts - 20
mysql.max_links - Unlimited
mysql.max_persistent - Unlimited
mysqli.max_links - Unlimited
mysqli.max_persistent - Unlimited
pcre.backtrack_limit - 1000000
pcre.recursion_limit - 100000
pgsql.max_links - Unlimited
pgsql.max_persistent - Unlimited
session.cache_limiter - <i>no value</i>
session.gc_maxlifetime - 1440
soap.wsdl_cache_limit - 5
xdebug.max_nesting_level - 100
xdebug.var_display_max_children - 128
xdebug.var_display_max_data - 20000
xdebug.var_display_max_depth - 15
opcache.max_accelerated_files - 2000
opcache.max_file_size - 0
opcache.max_wasted_percentage - 5

Browser User-Agent String

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/48.0.2564.82 Chrome/48.0.2564.82 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.