• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the next Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Question website show not existing pages

datenrettung

New Pleskian
Server operating system version
Ubuntu 16.04.7 LTS
Plesk version and microupdate number
Plesk Obsidian 18.0.34
Hello,My websites are displaying non-existent pages when incorrect URLs are entered. For example, accessing a valid URL works fine, but appending any extra path (e.g., "/a" or "/f") to it shows a not existing page instead of redirecting to the homepage.
Valid URL: https://hddlab.de/datenrettung/datenrettung-software.html
Invalid URL Example: https://hddlab.de/datenrettung/datenrettung-software.html

Current .htaccess rule:
Code:
RewriteEngine On
RewriteRule ^m/(.*)$ https://hddlab.de/$1 [R=301,L]

How can I modify my plesk configurations to redirect all non-existent pages back to the homepage? Thank you for your assistance.
 
To redirect all non-existent pages back to the home page, you can edit your .htaccess file in your Plesk configuration. Here's how you can do it:

1. Open your .htaccess file for editing.
2. Add the following lines to redirect all non-existing pages to the home page:

Code:
Rewrite engine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Rewrite Rule ^(*$ / [L,R=301]

These lines will check if the requested file or directory exists. If it doesn't, it will redirect the request to the home page.

3. Save the changes to your .htaccess file and test it by accessing the non-existent URL on your website. It should redirect to the home page instead of not showing the existing page anymore.

Always remember to back up your .htaccess file before making any changes, just in case something goes wrong.
 
Thanks, but after this modification the site show error on all pages: "
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Web Server at hddlab.de
"
 
Back
Top