The following warnings occurred:
Warning [2] Undefined array key "extra" - Line: 100 - File: inc/plugins/google_seo/url.php PHP 8.3.36 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/inc/plugins/google_seo/url.php 100 errorHandler->error_callback
/inc/plugins/google_seo.php 317 require_once
/inc/class_plugins.php 38 require_once
/inc/init.php 263 pluginSystem->load
/global.php 20 require_once
/showthread.php 28 require_once
Warning [2] Undefined array key "google_seo_thread" - Line: 1128 - File: inc/plugins/google_seo/url.php PHP 8.3.36 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/inc/plugins/google_seo/url.php 1128 errorHandler->error_callback
/inc/plugins/google_seo/url.php 174 google_seo_url_hook
/inc/plugins/google_seo.php 317 require_once
/inc/class_plugins.php 38 require_once
/inc/init.php 263 pluginSystem->load
/global.php 20 require_once
/showthread.php 28 require_once
Warning [2] Undefined array key 1 - Line: 261 - File: inc/plugins/google_seo.php PHP 8.3.36 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/inc/plugins/google_seo.php 261 errorHandler->error_callback
/inc/plugins/google_seo/url.php 1080 google_seo_dynamic
/inc/plugins/google_seo/url.php 1128 google_seo_url_dynamic
/inc/plugins/google_seo/url.php 174 google_seo_url_hook
/inc/plugins/google_seo.php 317 require_once
/inc/class_plugins.php 38 require_once
/inc/init.php 263 pluginSystem->load
/global.php 20 require_once
/showthread.php 28 require_once
Warning [2] Undefined array key "parent" - Line: 447 - File: inc/plugins/google_seo/url.php PHP 8.3.36 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/inc/plugins/google_seo/url.php 447 errorHandler->error_callback
/inc/plugins/google_seo/url.php 1144 google_seo_url_create
/inc/plugins/google_seo/url.php 174 google_seo_url_hook
/inc/plugins/google_seo.php 317 require_once
/inc/class_plugins.php 38 require_once
/inc/init.php 263 pluginSystem->load
/global.php 20 require_once
/showthread.php 28 require_once
Warning [2] Undefined variable $location - Line: 1250 - File: inc/plugins/google_seo/url.php PHP 8.3.36 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/inc/plugins/google_seo/url.php 1250 errorHandler->error_callback
/inc/plugins/google_seo/url.php 174 google_seo_url_hook
/inc/plugins/google_seo.php 317 require_once
/inc/class_plugins.php 38 require_once
/inc/init.php 263 pluginSystem->load
/global.php 20 require_once
/showthread.php 28 require_once
Warning [2] Trying to access array offset on null - Line: 198 - File: inc/plugins/google_seo.php PHP 8.3.36 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/inc/plugins/google_seo.php 198 errorHandler->error_callback
/inc/plugins/google_seo/redirect.php 131 google_seo_tid
/inc/class_plugins.php 142 google_seo_redirect_hook
/global.php 100 pluginSystem->run_hooks
/showthread.php 28 require_once
Warning [2] Undefined array key "oa_social_login_custom_caption" - Line: 356 - File: inc/plugins/oa_social_login.php PHP 8.3.36 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/inc/plugins/oa_social_login.php 356 errorHandler->error_callback
/inc/plugins/oa_social_login.php 197 oa_social_login_load_plugin
/inc/class_plugins.php 142 oa_social_login_load_plugin_hook_any
/global.php 498 pluginSystem->run_hooks
/showthread.php 28 require_once
Warning [2] Undefined variable $unreadreports - Line: 44 - File: global.php(961) : eval()'d code PHP 8.3.36 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/global.php(961) : eval()'d code 44 errorHandler->error_callback
/global.php 961 eval
/showthread.php 28 require_once




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Child routes resuting 404 error on refresh when hosted in S3
#1
I have a web application developed in angular 4 and build the application using ng build --prod and copied all files of dist folder into S3. I enabled S3 for static web hosting and configured landing page with index.html. The application is working as expected without any issues.

Now, If I refresh my browser, I am getting 404 error instead of existing page. I deployed the similar application in ECS and EC2 as well where I am able to refresh the page without any errors. Is there any solution for this.
Reply
#2
(10-08-2018, 07:57 PM)) phanikumar Wrote: Now, If I refresh my browser, I am getting 404 error instead of existing page. I deployed the similar application in ECS and EC2 as well where I am able to refresh the page without any errors. Is there any solution for this.

Hello Phani. It appears the problem you are having is related to the inability of Cloudfront/S3 to redirect to the index page by default (Default Directory Indexes) when you call the domain name in the distribution for folders other than the root folder.

You can solve this by configuring a lamda function to ensure the redirect is always happening to load the default index page. Below is the link that will help you do this.

https://aws.amazon.com/blogs/compute/imp...ambdaedge/

However, if it is still giving you a 404 when the link in the address bar shows the index page, then ensure that the Cloud distribution and S3 bucket policies are configured correctly.
Reply
#3
Hi FZS,

I just went with a solution I have configured error page with index.html which is letting the things work fine as of now even for child routes. Thanks for the support
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)