e107inc / e107

e107 Bootstrap CMS (Content Management System) v2 with PHP, MySQL, HTML5, jQuery and Twitter Bootstrap. Issue Discussion Room: https://gitter.im/e107inc/e107
https://e107.org
GNU General Public License v3.0
320 stars 213 forks source link

[Feature request]: Ability for a plugin to use a custom domain for a specific page of the site #5205

Closed CaMer0n closed 6 months ago

CaMer0n commented 6 months ago

Motivation

I wished to have a specific domain name correspond with a specific page of an existing site.

Proposed Solution

Add a 'domain' key to the e_url.php scheme. ie. When 'domain' value is present, e107 will search using the regexp, but also check the domain value entered is the same as what has been requested in the URL.


        $config['test'] = array(
            'domain'        =>  'example.com',
            'regex'     => '^\/?(.*)?$',
            'redirect'      => '{e_PLUGIN}myplugin/custom.php',
        );

Alternatives

Hard-coded ModRewrite for the page in .htaccess.

Additional Context

No response