最近,我开始使用.htaccess文件将API调用重定向到特定文件。然而,即使我的.htaccess文件正常工作(仅在文件顶部使用文本进行测试,我得到"Internal Server Error"),我的规则仍然不起作用。相反,Index.php始终是可读的。所有文件(index.php、somefile.php、.htaccess)都保存在同一个目录中。 .htaccess文件
我有这个网站,它的结构如下 |-- .htaccess |-- other files and directories
每个重定向都使用index.php如何使用修改.htaccess仅在某人想要访问mydomain.com时才重定向到mydomain.com/desiredLink,而不是当任何人使用mydomain.com/otherlink或mydomain.com