Route on Subdomain

Route on Subdomain 1.0.3

No permission to download

TickTackk

Well-known member
TickTackk submitted a new resource:

Route on Subdomain - Get help.example.com or media.example.com because you can.

Route on Subdomain

This add-on allows setting routes to be used on specific subdomains.

Installation

After installing the add-on like you would install any other add-on, you must add these lines to your config.php:

PHP:
$config['cookie']['domain'] = '<example.com>'; // this is so cookies are available on every sub-domain
$config['tckRouteOnSubdomain']['primaryHost'] = '<example.com>' // this is to differentiate real host vs. route ;
...

Read more about this resource...
 
.good code

I think it is better to use the _postSave method in TickTackk\RouteOnSubdomain\Entity\RouteOnSubdomain for this
1573558529044.webp

You can use \XF::logError() here:
1573558731138.webp
 
so all this forum threads will be in newforum.mysitedotcom ?
because when i set a pecific forum folder for my new forum, the thread are sill in /thread/ folder
only the forrum use the custom folder
 
Great add-on. Thanks so much for providing this!

Not a big deal, since I can't imagine anyone actually wanting to have it set up this way, but I noticed a few cookies errors when I had "Use Full Friendly URLs" disabled, but as soon as I enabled that it worked perfectly.

Also, I added the following to my .htaccess file (just in case anyone else finds it helpful):
HTML:
<IfModule mod_headers.c>
        <Files "*.woff2">
                Header set Access-Control-Allow-Origin "*"
        </Files>
</IfModule>
 
Does this allow you to route a single page to a subdomain? For example: I make a page node called "Help" and route it to "help.mydomain.com"?
 
I know this hasn't been posted to in a while, and doesn't say XF 2.2. But is it possible to use this to direct a board? Like "ark.mesozoichaven.com" ?
 
I know this hasn't been posted to in a while, and doesn't say XF 2.2. But is it possible to use this to direct a board? Like "ark.mesozoichaven.com" ?
Hypothetically I think it should although I will be trying to accomplish this for an addon. If it works, this is absolutely splendid, important, and could change my approach on several integrations. Thank you @TickTackk !!!!
 
Top Bottom