0
我有功能,直接HTML頁面的匹配PHP頁面名稱.htaccess的隱蔽大寫字母爲小寫和重定向的HTML PHP頁面
RewriteRule ^(.*).html $1.php [L,NC]
如果我鍵入一個URL能正常工作,這樣我們www.example.com的/privacy.html(privacy.php是網頁被渲染)
的第二個要求是大寫轉換爲小寫的URL,這樣我在http.conf中添加該代碼
RewriteEngine On
RewriteMap lc int:tolower
RewriteCond %{REQUEST_URI} [A-Z]
RewriteRule (.*) ${lc:$1} [R=301,L]
,這個代碼htaccess的CheckSpelling上
從大寫的covertion爲小寫的作品,但現在
www.example.com/PRIVACY.html
成爲
www.example.com/privacy.php
如果鍵入www.example.com/privacy.html
仍然有效。網址不變
我想保持URL在.html結尾任何人都可以幫忙嗎?