apache代理重写https://my.domain.fr/状态为404
我需要你帮忙。 我有一个HTTPD反向代理,我需要将所有返回404状态的所有内容重定向到主页。
我已经配置了这样的VHOST文件:
```
RewriteEngine On
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [R=404]
#ErrorDocument 404 http://%{HTTP_HOST}/
但是我不起作用。 而不是返回主页,而是返回此消息:
The requested URL / was not found on this server.
PS:我不使用HTACCESS文件,我只想使用VHOST文件使其正常工作。 你能帮我吗? 先感谢您。
I need you help please.
I have an httpd reverse proxy and I need to redirect everything that return 404 status to the main page.
I have configured my vhost file like this:
```
RewriteEngine On
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [R=404]
#ErrorDocument 404 http://%{HTTP_HOST}/
But I does not working.
Instead of returning the main page It return this message:
The requested URL / was not found on this server.
ps: I don't use htaccess file I just want to make it work using vhost file.
Can you help me please ?
Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论