.htaccess Htaccess将目录重定向到querystring
下面是我浏览时使用htaccess的重定向 我的example.net/video/1,然后将我重定向到example.net/abc/redirect.php.htaccess Htaccess将目录重定向到querystring,.htaccess,redirect,hyperlink,directory,query-string,.htaccess,Redirect,Hyperlink,Directory,Query String,下面是我浏览时使用htaccess的重定向 我的example.net/video/1,然后将我重定向到example.net/abc/redirect.php Options +FollowSymLinks RewriteEngine on RewriteCond %{Request_URI} /picture?$ RewriteRule ^ http://example.net/abc/redirect.php [L,R=301] 呃,如果我需要像。。。当我浏览这个链接时 http://
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{Request_URI} /picture?$
RewriteRule ^ http://example.net/abc/redirect.php [L,R=301]
呃,如果我需要像。。。当我浏览这个链接时
http://example.net/picture/1
或http://example.net/picture/2
它会将我重定向到一个带有查询字符串的链接,如
http://example.net/abc/redirect.php?picture=1
http://example.net/abc/redirect.php?picture=2
谢谢!:)
RewriteRule ^picture/([\d]+) /redirect.php?picture=$1 [L,R=301]