我的网站中有一个个性化的 404 错误页面,其中包含
ErrorDocument 404 404.htm
Run Code Online (Sandbox Code Playgroud)
在我的.htaccess。
问题是,如果您输入www.mydomain.com/whatever/whatever2.html,它会正确显示 404 页面,但链接都已损坏,例如href="property.php"指向 的链接www.mydomain.com/whatever/property.php,这也是 404 错误。
如何在不将所有路由更改为绝对路由的情况下解决此问题?