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.
我想要一个重写规则,将目录/文件带到 /file 因为在这种情况下,一切都可以在根目录中找到,我不想重写文件的源代码以指向根目录 ../ 而不是我在这种情况下特别喜欢 htaccess。
您可以简单地在文档根目录的 htaccess 文件中执行此操作
Redirect 301 /directory/file /file