我在我的 Mac 上使用 apache 服务器,一切正常。
现在我有一个网页,它index.php非常复杂: 在index.php中,它需要像这样的 url:localhost/~username/hostname/page_a。其内容page_a实际上是.php存储在content文件夹中的文件。所以在 中index.php,它只是解析page_a,并做一个 include: '' 来呈现请求页面。
但是在.htaccess中,重定向规则没有正确配置。
例如,如果我点击一个链接:localhost/~username/hostname/page_a,有没有办法将这个url重定向到index.php,同时该url仍然是localhost/~username/hostname/page_a,这样index.php才能正确解析和呈现它?
谢谢。