• Resolved tmtylblog

    (@tmtylblog)


    I’m using this plugin to customize all the URLs in the site:

    https://ww.wp.xz.cn/plugins/permalink-manager/

    custom permalink screenshot: https://ibb.co/cifsAv

    I have multi-domain set up correctly and it’s mapping my custom domains to the correct sites.

    Multi-domain setup screenshot: https://ibb.co/cLTOHa

    My problem occurs when it comes things like the portfolio or individual members. It wanted to show those on a generic permalink structure like chameleon.co/portfolio. I needed it to be in the cotest.chameleoncollective.com dev site but I had to rewrite the portfolio URLs with the customer permalink creator to have the needed sub-folder name in it so that it would get picked up my multi-domain. But Multi-domain isn’t picking it up at all.

    Or… maybe it’s not picking up the new hard custom Permalinks from the first module.

    Is it possible that the permalinks module is appearing in the the wrong order in the code? It could be re-writing the custom URLs AFTER the multi-domain module so that the multi-domain plugin doesn’t even see the new custom permalink URLS to rewrite them?

    Any thoughts? Can anyone help?

    THANK YOU!!!

    • This topic was modified 9 years ago by tmtylblog.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @tmtylblog

    I am the developer of Permalink Manager and I am afraid that my plugin is not compatible with this plugin, mainly because it does not use rewrite rules to detect the post from the URL.

    I added a new hook that allows to filter the query in 1.1.0 version.

    It is not released yet, but it can be downloaded from here:
    https://downloads.wp.xz.cn/plugin/permalink-manager.1.1.0.zip

    You will need to remove old instance of plugin & install the new one manually.

    You will also need to add an additional hook to append the directory names into the uri basing on the subdomain (you can paste it to your current theme’s functions.php file or create a new mini plugin with this snippet).

    function detect_subdomain($uri_parts, $request_url) {
    	$subdomain = $_SERVER["SERVER_NAME"];
    
    	switch($subdomain) {
    		case 'tmtyltest.chameleoncollective.com' :
    			$prefix = 'blog/';
    			break;
    		case 'cotest.chameleoncollective.com' :
    			$prefix = 'code-orange/';
    			break;
    		default :
    			$prefix = '';
    	}
    
    	$uri_parts['uri'] = "{$prefix}{$uri_parts['uri']}";
    
    	return $uri_parts;
    }
    add_filter('permalink-manager-detect-uri', 'detect_subdomain', 99, 2);
    Thread Starter tmtylblog

    (@tmtylblog)

    Thank you so much! Can you send me your PayPal email account. I want to send you a donate for making this plugin. Thx for the awesome support!

    Hi @tmtylblog,

    thank you, I really appreciate it! My Paypal email address is
    payments /at/ maciejbis.net

    Alternatively you can use my PayPal.me link:
    https://www.paypal.me/Bismit

    Best Regards,
    Maciej

    Thread Starter tmtylblog

    (@tmtylblog)

    Great. I just sent you 50 Euros. Keep up the good work!

    Thank you very much!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Custom Permalinks & Multi-Domain’ is closed to new replies.