Sui soon Chua
July 3, 2020, 01:29 AM
This note would be useful to those wish to have their script installed on subdomain url.
Symptoms:
Have define('RL_URL_HOME', 'http://subdomain.atdomain.com/') defined in config.inc.php for the site.
Able to get access to the main landing page. However, whenever clicked on any pages, the browser returns ERR_TOO_MANY_REDIRECTS or ERROR 404: Requested page not found.
Turn Apache rewrite to disable in Common->Basic Settings->General->Apache rewrite module, then those pages are accessible.
Turn Apache rewrite to enable, symptom 2 reproduced.
Root Cause Analysis:
The original .HTACCESS does not have a RewriteCond rules that cater for subdomain URL
Workaround:
Open & edit .htaccess in the web-root(e.g. /var/www/html/.htaccess), add RewriteCond %{HTTP_HOST} !^subdomain\. [NC] right after the RewriteCond %{HTTP_HOST} !^www\. [NC], which can be found under # wildcard request section.
Secondly, ensure Multifiled/Location Filter plugins is the latest version.
There is no proper & clear notes given by flynax to this scenario. Hope this useful.
Keyword: subdomain, too many redirects / redirect, 404, requested page not found.
Reference found on this forum that proven the above workaround,
https://forum.flynax.com/showthread.php?5269-Work-on-a-subdomain-Install-copy-script-on-a-subdomain
https://forum.flynax.com/showthread.php?2908-How-does-Flynax-work-with-subdomain
https://forum.flynax.com/showthread.php?3664-ERROR-404-Requested-page-not-found
Assume you have rewrite module enabled in Apache and is working.
Symptoms:
Have define('RL_URL_HOME', 'http://subdomain.atdomain.com/') defined in config.inc.php for the site.
Able to get access to the main landing page. However, whenever clicked on any pages, the browser returns ERR_TOO_MANY_REDIRECTS or ERROR 404: Requested page not found.
Turn Apache rewrite to disable in Common->Basic Settings->General->Apache rewrite module, then those pages are accessible.
Turn Apache rewrite to enable, symptom 2 reproduced.
Root Cause Analysis:
The original .HTACCESS does not have a RewriteCond rules that cater for subdomain URL
Workaround:
Open & edit .htaccess in the web-root(e.g. /var/www/html/.htaccess), add RewriteCond %{HTTP_HOST} !^subdomain\. [NC] right after the RewriteCond %{HTTP_HOST} !^www\. [NC], which can be found under # wildcard request section.
Secondly, ensure Multifiled/Location Filter plugins is the latest version.
There is no proper & clear notes given by flynax to this scenario. Hope this useful.
Keyword: subdomain, too many redirects / redirect, 404, requested page not found.
Reference found on this forum that proven the above workaround,
https://forum.flynax.com/showthread.php?5269-Work-on-a-subdomain-Install-copy-script-on-a-subdomain
https://forum.flynax.com/showthread.php?2908-How-does-Flynax-work-with-subdomain
https://forum.flynax.com/showthread.php?3664-ERROR-404-Requested-page-not-found
Assume you have rewrite module enabled in Apache and is working.