Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess Htaccess将目录重定向到querystring_.htaccess_Redirect_Hyperlink_Directory_Query String - Fatal编程技术网

.htaccess Htaccess将目录重定向到querystring

.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://

下面是我浏览时使用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://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]