cloudpanel-io/cloudpanel-ce

URL rewriting not functioning as expected in Nginx configuration for example.com

Closed this issue · 1 comments

CloudPanel version(s) affected

2.4.1

Description

Description:
The Nginx configuration for the website seotoolsearth.com is encountering issues with URL rewriting. Despite attempts to rewrite specific URLs to their target URLs, the rewriting is not functioning correctly. As a result, accessing certain URLs such as "https://seotoolsearth.com/keyword-density-checker", "https://seotoolsearth.com/example1", and "https://seotoolsearth.com/example2" does not redirect to their respective target URLs as intended.

Steps to Reproduce:

Access the URLs "https://seotoolsearth.com/keyword-density-checker", "https://seotoolsearth.com/example1", and "https://seotoolsearth.com/example2".
Observe that the URLs do not redirect to their intended target URLs.
Review the Nginx configuration to ensure proper setup of URL rewriting rules.

Expected Behavior:
Upon accessing the specified URLs, they should be rewritten to their respective target URLs:

"/keyword-density-checker" should be rewritten to "/index.php?route=keyword-density-checker"
"/example1" should be rewritten to "/index.php?route=example1"
"/example2" should be rewritten to "/index.php?route=example2"
Actual Behavior:
The URLs mentioned above are not rewritten and do not redirect to their respective target URLs.

Environment:

Website: seotoolsearth.com
Nginx Version: Latest
Operating System: UBUNTU server Latest

How to reproduce

Access the URLs "https://seotoolsearth.com/keyword-density-checker", "https://seotoolsearth.com/example1", and "https://seotoolsearth.com/example2".
Observe that the URLs do not redirect to their intended target URLs.
Review the Nginx configuration to ensure proper setup of URL rewriting rules.
Expected Behavior:
Upon accessing the specified URLs, they should be rewritten to their respective target URLs:

"/keyword-density-checker" should be rewritten to "/index.php?route=keyword-density-checker"
"/example1" should be rewritten to "/index.php?route=example1"
"/example2" should be rewritten to "/index.php?route=example2"
Actual Behavior:
The URLs mentioned above are not rewritten and do not redirect to their respective target URLs.

Possible Solution

Upon accessing the specified URLs, they should be rewritten to their respective target URLs:

"/keyword-density-checker" should be rewritten to "/index.php?route=keyword-density-checker"
"/example1" should be rewritten to "/index.php?route=example1"
"/example2" should be rewritten to "/index.php?route=example2"
Actual Behavior:
The URLs mentioned above are not rewritten and do not redirect to their respective target URLs.

Additional Context

Please reply or fix it with new version or update/patch to cloudpanel directly

Not a CloudPanel issue. You can apply rules in the vhost of your site to make it work.