0

下面是我浏览我的 example.net/video/1 时使用 htaccess 进行的重定向,然后将我重定向到 example.net/abc/redirect.php

Options +FollowSymLinks

RewriteEngine on
RewriteCond %{Request_URI} /picture?$
RewriteRule ^ http://example.net/abc/redirect.php [L,R=301]

呃,如果我需要类似...当我通过此链接浏览 http://example.net/picture/1http://example.net/picture/2

它会将我重定向到带有查询字符串的链接,例如

http://example.net/abc/redirect.php?picture=1

http://example.net/abc/redirect.php?picture=2

谢谢!:)

4

1 回答 1

0
RewriteRule ^picture/([\d]+) /redirect.php?picture=$1 [L,R=301]
于 2013-05-14T11:26:54.940 回答