Forum Post Assistant too many redirects Topic is solved

This Forum board is about discussions about the FPA tool.

Moderator: General Support Moderators

Forum rules
Post Reply
springburn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Tue Feb 28, 2017 5:23 pm

Forum Post Assistant too many redirects

Post by springburn » Wed Oct 28, 2020 6:42 pm

Trying to run the fpa with domain.com\fpa-en.php we get domain.com redirected you too many times - ERR_TOO_MANY_REDIRECTS
This is a Ubuntu 20, php 7.4, vhost site running under ispconfig 3.2b3 and fpa-en.php is in the site's webroot directory.
The .htaccess matches the standard htaccess.txt
While it has issues the site does load normally.

Additionally, is there is a way to force Joomla to see webroot as:
/var/www/domain.tls/web
instead of
/var/www/clients/client1/web1/web

Thanks in advance
Last edited by imanickam on Thu Oct 29, 2020 2:31 am, edited 1 time in total.
Reason: Moved topic » from General Questions/New to Joomla! 3.x to Forum Post Assistant (FPA)

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 12901
Joined: Thu Feb 15, 2007 5:48 am
Location: Zagreb, Croatia

Re: Forum Post Assistant too many redirects

Post by toivo » Thu Oct 29, 2020 9:06 am

springburn wrote:
Wed Oct 28, 2020 6:42 pm
fpa-en.php is in the site's webroot directory.
Is that the main directory where Joomla is installed? Then no redirections should be possible, unless they have been configured in the web server.

springburn wrote:
Wed Oct 28, 2020 6:42 pm
Additionally, is there is a way to force Joomla to see webroot as:
/var/www/domain.tls/web
instead of
/var/www/clients/client1/web1/web
The web server sets the document root of each of its virtual hosts in their configuration files. Joomla has nothing to do with that.
Toivo Talikka, Global Moderator

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 39217
Joined: Sat Apr 05, 2008 9:58 pm

Re: Forum Post Assistant too many redirects

Post by Webdongle » Thu Oct 29, 2020 2:29 pm

Is this a local machine or remote Host?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein.

springburn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Tue Feb 28, 2017 5:23 pm

Re: Forum Post Assistant too many redirects

Post by springburn » Thu Oct 29, 2020 2:33 pm

Remote host (AWS)

springburn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Tue Feb 28, 2017 5:23 pm

Re: Forum Post Assistant too many redirects

Post by springburn » Fri Oct 30, 2020 4:20 pm

To answer the previous question:
Yes fpa-en.php is in the site's webroot directory which is also where the joomla directory is installed.
The only redirect on the site is for http to https

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 12901
Joined: Thu Feb 15, 2007 5:48 am
Location: Zagreb, Croatia

Re: Forum Post Assistant too many redirects

Post by toivo » Fri Oct 30, 2020 4:41 pm

Thank you for the confirmation.

springburn wrote:
Fri Oct 30, 2020 4:20 pm
The only redirect on the site is for http to https
The standard method is to select the option Global Configuration - Server - Force HTTPS. Is that how the redirection was done?

Ref. Enabling HTTPS on your site - in Joomla
Toivo Talikka, Global Moderator

springburn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Tue Feb 28, 2017 5:23 pm

Re: Forum Post Assistant too many redirects

Post by springburn » Fri Oct 30, 2020 5:04 pm

Yes Global Configuration - Server - Force HTTPS is set to entire site.

Thanks

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 39217
Joined: Sat Apr 05, 2008 9:58 pm

Re: Forum Post Assistant too many redirects

Post by Webdongle » Fri Oct 30, 2020 5:48 pm

springburn wrote:
Fri Oct 30, 2020 5:04 pm
Yes Global Configuration - Server - Force HTTPS is set to entire site.
...
Then try removing the redirect from the .htaccess
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein.

springburn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Tue Feb 28, 2017 5:23 pm

Re: Forum Post Assistant too many redirects

Post by springburn » Fri Oct 30, 2020 7:08 pm

Thanks for the reply.
As far as I can see there is no reference to a redirect in .htaccess.
I removed the .htaccess file and it made no difference.

springburn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Tue Feb 28, 2017 5:23 pm

Re: Forum Post Assistant too many redirects

Post by springburn » Mon Nov 02, 2020 4:15 pm

Still struggling with this issue.
My understanding was that the FPA was an information collector.
Can anyone shed some light on how redirects would come into it?

Thanks

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 12901
Joined: Thu Feb 15, 2007 5:48 am
Location: Zagreb, Croatia

Re: Forum Post Assistant too many redirects

Post by toivo » Mon Nov 02, 2020 4:33 pm

The redirection happens before the script fpa-en.php gets started. Does the server control panel ISPConfig 3.2b3 have options that could cause the issue?
Toivo Talikka, Global Moderator

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 12901
Joined: Thu Feb 15, 2007 5:48 am
Location: Zagreb, Croatia

Re: Forum Post Assistant too many redirects

Post by toivo » Mon Nov 02, 2020 5:33 pm

Correction: The FPA script does actually redirect the request in certain circumstances. Questions:

Do you run the FPA using the URL with http or https?

Does the domain in the SSL certificate match the domain of the website?

It is possible to troubleshoot FPA v1.6.1 and get it to display errors and write them into a file called fpa_error.log in the folder where the FPA script is run.

Edit line 75 and uncomment it, by changing the line defining the diagnostic constant from:

Code: Select all

     #define ( '_FPA_DIAG', TRUE );
to:

Code: Select all

     define ( '_FPA_DIAG', TRUE );
In addition to diagnostics, this operation disables the redirection, too. Please let us know the situation with the SSL certificate and if the diagnostic setting allows the FPA to run.
Toivo Talikka, Global Moderator

springburn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Tue Feb 28, 2017 5:23 pm

Re: Forum Post Assistant too many redirects

Post by springburn » Mon Nov 02, 2020 7:49 pm

Making the change to line 75 did allow the FPA to run. Thanks for that.

We run the FPA with https in the url
The domain cert does match.

Having said that the banner reporting that diagnostic mode is enabled also states:
SSL may not be available for this site, it is recommended that SSL is used on all sites where possible.

The address bar has the padlock and the url is: https://domainname.com/fpa-en.php

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 12901
Joined: Thu Feb 15, 2007 5:48 am
Location: Zagreb, Croatia

Re: Forum Post Assistant too many redirects

Post by toivo » Mon Nov 02, 2020 11:17 pm

springburn wrote:
Mon Nov 02, 2020 7:49 pm
the banner reporting that diagnostic mode is enabled also states:
SSL may not be available for this site, it is recommended that SSL is used on all sites where possible.
Is your website behind a load balancer?

Lines 3559 - 3561 of FPA v1.6.1 check the availability of SSL and display the above message:

Code: Select all

                    if ( @$_SERVER['HTTPS'] != 'on' ) {
                        echo '<p class="pt-1 mb-1 w-75 mx-auto"><i class="fas fa-unlock-alt fa-fw"></i> SSL may not be available for this site, it is recommended that SSL is used on all sites where possible.</p>';
                        }
The server variable $_SERVER['HTTPS'] is not 'on' if it is undefined, which can apparently happen in some servers. The variable $_SERVER['HTTPS'] can also refer to the connection between the load balancer and the web server, which may use HTTP, even if the browser communicates with the load balancer or the reverse proxy using HTTPS.

Ref. Are you using HTTPS without $_SERVER['HTTPS']
Toivo Talikka, Global Moderator

springburn
Joomla! Apprentice
Joomla! Apprentice
Posts: 19
Joined: Tue Feb 28, 2017 5:23 pm

Re: Forum Post Assistant too many redirects

Post by springburn » Tue Nov 03, 2020 2:18 pm

Yes it is behind a load balancer. Thanks for the information.

User avatar
RussW
Joomla! Exemplar
Joomla! Exemplar
Posts: 9357
Joined: Sun Oct 22, 2006 4:42 am
Location: Sunshine Coast, Queensland, Australia
Contact:

Re: Forum Post Assistant too many redirects

Post by RussW » Mon Nov 09, 2020 9:37 pm

Thanks for your time and research on this matter @toivo, an issue has been raised with the project team and we will look in to how best to work with this apparent mixed-SSL connection situation.

For the moment, if @springburn wishes to still try FPA, the best method moving forward may be to manually disable the FPA SSL-Detection routine.

Code: Select all

Line 98
define ( '_FPA_SSL_REDIRECT', TRUE);          // SSL Redirect - when possible and if a valid SSL certificate is found FPa will attempt to redirect to the SSL version of the site
either just comment this line out with a " # " infront of it, or set it to " FALSE " (from TRUE) in the define

Cheers
Russ
Joomla! on the fabulous Sunshine Coast...
hotmango, web & print http://www.hotmango.me/
The Styleguyz https://www.thestyleguyz.com/

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 39217
Joined: Sat Apr 05, 2008 9:58 pm

Re: Forum Post Assistant too many redirects

Post by Webdongle » Tue Nov 10, 2020 10:13 am

A simple checkbox for if there is a load balancer ... with If/OR in the code?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein.


Post Reply

Return to “Forum Post Assistant (FPA)”