Apache:将特定的传入路由重定向到另一个内部URL

时间:2018-04-11 13:00:35

标签: apache redirect apache2 virtualhost

当用户访问我的网站http://mywebiste.com的此网址时,他会被重定向到/var/www/polo/current/public中的documentRoot文件夹。

我想添加另一条规则,将所有对http://mywebsite.com/telka的调用重定向到http://10.10.21.21/doc/test

我该怎么做?

这是我的apache配置文件:

<VirtualHost *:80>
  ServerAdmin me@mydomain.com
  DocumentRoot /var/www/polo/current/public

  <Directory /var/www/polo/current/public/>
      Options +FollowSymLinks +MultiViews
      AllowOverride All
      Require all granted
  </Directory>

  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

0 个答案:

没有答案