大家好 我有一个问题,我的档案有html的延伸,但我想,当文件打开brownser的延伸不得不hidden.eg file.html到文件。 先感谢
Hi All i have a problem that my file have .html extention but i want that when the file open in brownser the extention had hidden.e.g file.html to file. Advance thanks
在你的的.htaccess
文件中使用这样的:
In your .htaccess
file use this:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html
现在你可以使用林家如 http://www.mysite.com/contact
,而不是 http://www.mysite.com /contact.html
。
Now you can use lins like http://www.mysite.com/contact
rather than http://www.mysite.com/contact.html
.
希望这有助于!