Ich habe eigene 404 Seiten erstellt, auf die verlinkt wird, wenn eine unbekannte Seite an angefragt wird.
Bei der static pages mod können über die htaccess alle Anfragen von domain.de/page.php auf domain.de/name_der_static_page umgeleitet werden.
Dazu muss dieser Code eingebaut werden:
Code: Alles auswählen
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-Za-z0-9\-\+]+)$ ./page.php?p=$1 [L]
Meine komplette htaccess sieht so aus:
Code: Alles auswählen
#
# Uncomment the statement below if you want to make use of
# HTTP authentication and it does not already work.
# This could be required if you are for example using PHP via Apache CGI.
#
#<IfModule mod_rewrite.c>
#RewriteEngine on
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#</IfModule>
RewriteRule sitemap\.xml sitemap.php [L]
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files .htaccess>
order allow,deny
deny from all
</Files>
ErrorDocument 401 /error_page.php?type=401
ErrorDocument 404 /error_page.php?type=404
ErrorDocument 500 /error_page.php?type=500
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>