私はいくつかのhtmlファイルを持つサイトを持っています。それらの1つはcontact.htmlです。これは私の.htaccessです。site.com/contact/ではなく、site.com/contactを使ってページに対処することができます。 (終了スラッシュに注意してください。)修正は何ですか?スラッシュを.htaccessで追加できません
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]
それを修正しました。 src、href、およびimageリンクを使ってすべての相対パスを探し、固定パスに切り替えるだけでした。 –