需要使網站http://www.example.com/testimonials.htm 到http://www.example.com/testimonials使用.htaccess。使.htm隱藏
請幫
需要使網站http://www.example.com/testimonials.htm 到http://www.example.com/testimonials使用.htaccess。使.htm隱藏
請幫
試試這個:
RewriteEngine on
RewriteBase/
RewriteRule (.*)/$ $1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !\.htm$
RewriteRule ^(.*)$ $1.html [L,QSA]
僅供參考,這是一個可怕的問題。這種問題**不應該在任何地方遷移**。這樣做就像訪問你的朋友並在他的門墊上傾倒一個屎。 – ThiefMaster