Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我的 htaccess 文件中,我想获得正确的正则表达式来匹配以下内容
any.com/anypage.html 将重定向到anything.com/anypage
所以这基本上可以让 html 从我的网址中剥离出来。
谢谢
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)\.html$ /$1 [L,R=301]