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.
我想对某些不以 html 结尾的文件进行重定向,但不是我网站上的所有文件。这是我所拥有的:
这是在 Drupal 中。例如,对于 www.mysite.com/test,我想重定向到 www.mysite.com/test.html
这就是我所拥有的。我不确定这是否是 Drupal 问题。
RewriteRule ^test!\.html$ http://www.mysite.com/test.html [R=301,L]
卸下!\.html零件
!\.html
RewriteRule ^test$ http://www.mysite.com/test.html [R=301,L]