Permalinks Problems & Update

By Perchpole - August 5, 2013

Hello, All

I was a little disapointed with the initial permalinks release as it seemed unable to handle query strings. However, since then the plugin has been updated so I thought I'd give it another go.

I've just installed the plugin and all I seem to be able to generate is an error message:

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

This error has been documented before on this forum. Each time the problem appears to have been fixed by iTools - but solution has been posted!

For the record, the permalinks file is present in the correct folder and my web root is correctly set-up in my General Settings.

:0/

Perch

Hi Perch,

We are currently looking into a fix for this problem, this issue is on line 12 of the permalinks_dispatcher.php file, which you can see here:

$REDIRECT_URL = coalesce(@$_SERVER['REDIRECT_URL'], @$_SERVER['SCRIPT_URL'], array_first(explode('?',$_SERVER['REQUEST_URI'])));

which needs changing to this:

$REDIRECT_URL = coalesce(@$_SERVER['SCRIPT_URL'], array_first(explode('?',$_SERVER['REQUEST_URI'])), @$_SERVER['REDIRECT_URL']);

This is because on some servers the variable $_SERVER['REDIRECT_URL'] doesn't contain the URL  that the page was redirected to, but the path to the current file. So permalinks_dispatcher file ends up looking for the incorrect file path in its database.

This issue should be resolved in the next release.

Let me know if you have any questions. 

Cheers

Greg

Greg Thomas







PHP Programmer - interactivetools.com

Hi Tim,

Thanks for bringing this to our attention.

We've checked over the next release and the website root directory and program URL will be automatically set by default.

Cheers

Greg

Greg Thomas







PHP Programmer - interactivetools.com