PrestaShop Product Pages Redirecting to Homepage: A Deep Dive into Routing Issues

PrestaShop Product Pages Redirecting to Homepage: A Deep Dive into Routing Issues

A common and often frustrating issue for PrestaShop merchants is when product or category pages unexpectedly redirect back to the homepage. This community insight explores a specific instance of this problem, where a PrestaShop 8.2.0 store began redirecting all front-end links to its landing page, despite the merchant's initial attempts at troubleshooting. The discussion highlights the complexity of such issues and the value of expert community diagnosis.

The Problem: Persistent Homepage Redirections

The user, Daniel, reported that their PrestaShop 8.2.0 store, operational since February 2025, suddenly started redirecting all product and navigation links (e.g., https://cv-akl.com/beranda/385-sanitarian-kit-kesling-kit.html) back to the homepage. This behavior began approximately three weeks prior to their post. Daniel had already attempted several common troubleshooting steps, many suggested by AI tools like ChatGPT and Gemini, without success. These initial attempts included:

  • Checking URL Rewriting: Ensuring "Friendly URL" was enabled under Shop Parameters > Traffic & SEO.
  • Clearing Cache: Using the "Clear Cache" button in Advanced Parameters > Performance.
  • Checking .htaccess File: Regenerating the .htaccess file from Shop Parameters > Traffic & SEO and verifying server's mod_rewrite module.
  • Reviewing Error Logs: Checking cPanel's Recent Errors tab for related messages.
  • Disabling Overrides: Temporarily disabling custom modules or theme overrides via Advanced Parameters > Performance.
  • Checking for Module Conflicts: Disabling recently installed modules.

Despite these efforts, the issue persisted, indicating a deeper problem beyond standard PrestaShop configuration.

Community Diagnoses and Solutions

The PrestaShop community quickly jumped in with more targeted advice, moving beyond the generic suggestions Daniel had already tried:

  • Initial Module & JavaScript Check: One suggestion involved deactivating the "Products Comments" module and clearing the cache, noting that several JavaScript errors (including GraphQL execution errors) were present on the site. While not the root cause in this case, JavaScript errors can often mask or contribute to front-end display issues.
  • Deep Technical Analysis: A community expert performed a detailed investigation using Chrome DevTools and HTTP traffic analysis. This analysis identified a "consistent routing problem affecting multiple PrestaShop controllers," suggesting the issue was fundamental to how the shop processed URLs.
  • Module/Theme Override Hypothesis: Another contributor suggested that since the problem appeared recently, a newly updated module or theme override might be forcing an unintended redirect back to the home route. They recommended testing with the default theme and non-essential modules disabled, along with checking browser console and server redirect logs.
  • The Critical Diagnosis: Server-Level Rewrite Issue: The most comprehensive and insightful diagnosis pinpointed the core of the problem:

    "Every request on your site reaches PrestaShop as /, including index.php?c and URLs that don't exist (they return the homepage with a 200 instead of a 404). The page source on a product URL shows current_url as https://cv-akl.com/, so the path and query string are already gone before PrestaShop starts routing."

    This crucial observation meant that the URL path and query string were being stripped or rewritten before PrestaShop's internal routing mechanism could even process them. This pointed away from PrestaShop's internal configuration and towards the web server's rewrite rules or an external factor.

    The recommended steps for this advanced scenario included:

    • Downloading a backup of the .htaccess file in the shop root.
    • Checking for rewrite rules above the # ~~start~~ block in .htaccess that PrestaShop does not write itself.
    • Investigating any .htaccess files in parent directories above the shop's root.
    • Renaming the existing .htaccess and regenerating a fresh one from Shop Parameters > Traffic & SEO.
    • If the issue persists, contacting the hosting provider to check the LiteSpeed rewrite configuration (if applicable) and scan the account for any anomalies, especially since the problem started spontaneously.

This thread serves as an excellent example of how complex PrestaShop issues, particularly those involving server-level configurations, require a methodical and deep diagnostic approach. While AI can offer basic troubleshooting, community experts often provide the critical insights needed to resolve obscure problems that bypass PrestaShop's internal routing entirely.

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools