1个htaccess,2个域名,重写到另一个域名

问题描述 投票:0回答:1

我在1个网页上有2个网址(1个htaccess),你能帮助我在这个网站上永久重定向(mod_rewrite)2个子页面到另一个网址吗?

呜呜呜.something.操作/hello/ -> 呜呜呜.first.操作/#ID WWW.something.上课/hello/ -> 呜呜呜.second.上课/some URL/#ID

谢谢。

.htaccess mod-rewrite
1个回答
0
投票
RewriteEngine On

RewriteCond %{HTTP_HOST} something.cz [NC]
RewriteRule ^/?hello/ http://www.first.cz/#id? [R=301,L]

RewriteCond %{HTTP_HOST} something.sk [NC]
RewriteRule ^/?hello/ http://www.second.sk/someurl/#id? [R=301,L]

在评论中报告反馈

© www.soinside.com 2019 - 2024. All rights reserved.