• Bit of an odd one, but with all the things going on and home working… We use WordPress for our intranet and I have remote access using a piece of cloud based VPN software. It rewrites the URL though so it’s causing some issues when saving certain content it will change the url and if you forget to manually change the links when inserting files etc it will save as the VPN url. For instance intranet.remote-access.com rather than intranet.local-domain.com which means folks on site can’t open the links…

    There is no way around the fact the cloud software needs to rewrite the URL to its own so we were thinking a way of doing a filter on post, so every time something is saved, be it a page, post or menu etc any urls which are intranet.remote-access.com are replaced with intranet.local-domain.com before its saved into the database… is there a plugin or is this a simple task we can write a plugin/function for?

    Just to complicate it more its a multisite with 5 sub domains, which for instance are policies.intranet.local-access.com but the way the VPN software interprets that is policies_intranet.remote-access.com. The _ being the issue rather than the . meaning an extra check needs to be in there so not to just do a simple replace of the main domain leaving the _ instead of a .

    • This topic was modified 4 years, 11 months ago by Dave.
    • This topic was modified 4 years, 11 months ago by Dave.
    • This topic was modified 4 years, 11 months ago by Dave.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Need to figure out how to make a plugin that will rewrite urls on post (saving).’ is closed to new replies.