Problem with permalink dispatcher and enewsletters

By JeffC - July 11, 2018

Hi

I have a new problem, which I think has been caused by moving from http to https.

The links in my emails sent via Newsletter Builder no longer work. On clicking the following message is displayed:

Not Found. The requested URL /cmsAdmin/plugins/permalinks_dispatcher.php was not found on this server.

I'm guessing somewhere in my newsletterBuilder files I need to change http to https, can someone tell me where?

Thanks
Jeff

Jeff

By gregThomas - July 13, 2018

Hey Jeff,

That error sounds like the path in the htaccess to the permalinks dispatcher isn't correct, or the permalink dispatcher is using the incorrect path.

When that error displays, what appears below it? There should be a message along the lines of "The requested URL example.com was not found on this server." Below that will be the source of the error, does it say "Permalinks Dispatcher at example.com Port X", or does it say something related to the server?

Also, what happens if you switch between HTTPS and HTTP, does the error go away when you're on HTTP?

Finally, what version of CMS Builder and the Permalinks dispatcher are you using?

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By gregThomas - July 30, 2018

Hey Jeff, 

Thanks for the extra details, I've got a good idea of what's causing the problem.

On some hosting packages the global variable that we use to get the URL contains the path to the current file ( /cmsAdmin/plugins/permalinks_dispatcher.php ) instead of the URL that the browser is attempting to access (/my/permalink).

To resolve this, If you open the file permalinks.php plugin file, then edit line 313 from this:

  if     (@$_SERVER['REQUEST_URI'])        { $redirectUrl = $_SERVER['REQUEST_URI']; }
  elseif (@$_SERVER['REDIRECT_URL'])       { $redirectUrl = $_SERVER['REDIRECT_URL']; }
  elseif (@$_SERVER['SCRIPT_URL'])         { $redirectUrl = $_SERVER['SCRIPT_URL']; }
  elseif (@$_SERVER['HTTP_X_REWRITE_URL']) { $redirectUrl = $_SERVER['HTTP_X_REWRITE_URL']; }  // For Windows/IIS Servers with ISAPI_Rewrite

to this:

  if     (@$_SERVER['SCRIPT_URL'])         { $redirectUrl = $_SERVER['REQUEST_URI']; }
  elseif (@$_SERVER['REDIRECT_URL'])       { $redirectUrl = $_SERVER['REDIRECT_URL']; }
  elseif (@$_SERVER['REQUEST_URI'])        { $redirectUrl = $_SERVER['SCRIPT_URL']; }
  elseif (@$_SERVER['HTTP_X_REWRITE_URL']) { $redirectUrl = $_SERVER['HTTP_X_REWRITE_URL']; }  // For Windows/IIS Servers with ISAPI_Rewrite

That should resolve the issue, as the SCRIPT_URL variable is normally accurate.

Thanks,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By JeffC - August 2, 2018 - edited: August 2, 2018

Thanks Greg

I have made those changes. What's the best way of checking that it has worked, without actually sending a email to my database?

Something is still not right however, and the problem is wider than I thought. The problem is not just with email, the link below should redirect to the https, but I am getting the same dispatcher error.

http://www.mydomainhere.couk/recipe/bruschetta-3-ways/

Can I escalate this to higher tier support? Happy to pay to fix, so that we can get it sorted asap.

Jeff

Hey Jeff,

Sure thing, we can take a look into this for you. If you send an email to support@interactivetools.com and include a the CMS and FTP details for the site and I'll get started.

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By JeffC - August 3, 2018

Thanks Greg.

I sent you an email yesterday via the form on the website. I think that goes to consulting@. Will resend to support@. Apologies if you receive it twice.

Cheers

Jeff