Problem with permalink dispatcher and enewsletters

By JeffC - July 11, 2018


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?



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 was not found on this server." Below that will be the source of the error, does it say "Permalinks Dispatcher at 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?



Greg Thomas

PHP Programmer -

By JeffC - July 30, 2018

Hi Greg

Thanks for your reply.

Yep, you're spot on. The full message is:

Not Found

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

Permalinks Dispatcher at Port 443

I don't know how to test if switching between HTTPS and HTTP makes a difference. The error is occurring with an automated email you set up for me a few years ago. I am running a cron job to automatically send an email each Monday at 0:00. For now I have made the emails inactive, the only way I know of testing it is to make active and keep my fingers crossed! There's 10,000+ people on my list – so I would rather not risk that, if it could be avoided.  

I'm using v3.10 and v1.05

Here is the content of my htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^permalinks_dispatcher\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /cmsAdmin/plugins/permalinks_dispatcher.php [L]

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

<Files 403.shtml>
order allow,deny
allow from all

deny from
deny from

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php56” package as the default “PHP” programming language.
<IfModule mime_module>
AddType application/x-httpd-ea-php56___lsphp .php .php5 .phtml
# php -- END cPanel-generated handler, do not edit


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.



Greg Thomas

PHP Programmer -

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.


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


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.