【发布时间】:2020-07-12 13:36:50
【问题描述】:
我使用 apache 设置了以下测试站点,并从以下位置提供服务 /htdocs/www/*:
https://local.sweetcar.com/www/mycompany/
https://local.sweetcar.com/www/sweetcar/
我想配置一个 apache 重写来提供以下网址
https://local.mycompany.com/
https://local.sweetcar.com/
因此 www/mycompany/ 和 www/sweetcar/ 已从 url 中删除,而其他所有内容都被保留
这是我尝试过的,但没有成功:
.htaccess
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
【问题讨论】:
-
local.mycompany.com是否有类似local.sweetcar.com的VirtualHost条目? -
是的,两个网站都使用上述网址
标签: apache .htaccess url-rewriting apache2