【发布时间】:2018-06-06 14:38:59
【问题描述】:
我有一个 www.example.com/page.html 页面,上面有一个链接,该链接指向空白页面 www.example.com/folder/link.php?id=123456
由于特定原因,当我在同一页面上但使用其他语言时(页面类似于 www.example.com/page_ro.html),我无法更改此链接,需要使用重写条件来更改它同一个链接。
假设在这种情况下我需要将链接变为 www.example.com/folder/link.php?id=78910。
在这种情况下我该怎么做?我试过这个没有成功:
RewriteEngine On
Options +FollowSymLinks
RewriteCond %{HTTP_REFERER} .
RewriteCond %{HTTP_REFERER} ^http://www\.example\.com/page_ro.html [NC]
RewriteCond %(REQUEST_URI) folder/link\.php?id=123456$ [NC]
RewriteRule ^(.*) http://www.example.com/link.php?id=78910 [L]
【问题讨论】:
标签: .htaccess mod-rewrite referer