-1
我現在的.htaccess文件是:的.htaccess:刪除.html和添加結尾斜線
## Go Daddy servers need the Options -MultiViews code below
Options -MultiViews
RewriteEngine On
RewriteBase/
# Remove .html extension
RewriteCond %{THE_REQUEST} ^GET\ /[^?\s]+\.html
RewriteRule (.*)\.html$ /$1/ [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/(.+)/$
RewriteCond %{DOCUMENT_ROOT}/%1.html -f
RewriteRule ^(.*)/$ $1.html [L]
# Force trailing slash
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule .*[^/]$ $0/ [L,R=301]
但是,當我訪問一個頁面,它說:「所請求的URL/SomePage的/在這個服務器上沒找到。」我將如何解決這個問題?
嗯,它似乎從頁面中刪除了CSS和資產。 – mannyrothman
如果css是問題,那麼在你的文檔頭部添加** ** – starkeen
像這樣:https://gist.github.com/fcpwiz/d19c67012193c5a57dd4? – mannyrothman