Ich habe eine Website mit einigen HTML-Dateien darauf. Einer von ihnen ist contact.html. Das ist mein .htaccess, und ich habe Probleme, wo ich die Seite mit site.com/contact, aber nicht site.com/contact/ adressieren kann. (Beachten Sie den Schrägstrich.) Was ist das Problem?Kann Slash mit .htaccess nicht hinzufügen
RewriteEngine On
# If the requested URI does not contain a period in the final path-part
RewriteCond %{REQUEST_URI} !(\.[^./]+)$
# and if it does not exist as a directory
RewriteCond %{REQUEST_fileNAME} !-d
# and if it does not exist as a file
RewriteCond %{REQUEST_fileNAME} !-f
# then add .html to get the actual filename
rewriterule (.*) /$1.html [L]
Das hat es behoben. Ich musste nur sicherstellen, dass ich nach allen relativen Pfadangaben mit src-, href- und Image-Links suche und sie auf fixe Pfade umschalte. –