我有这个链接,我可以访问:
http://domain.com/search/csgo/US/nameorip/?matching=dust2
.htaccess看起来像这样:
RewriteRule ^search/([a-z_]+)/([A-Z_]+)/([a-z]+)/?matching=(.*)?$ servers.php?game=$1&location=$2&query_by=$3&matching=$4 [NC,L]
我访问此链接后,我被重定向到404页面。为什么?我的.htacces
文件出了什么问题?
matching
,对吗?
答案 0 :(得分:3)
您可以尝试:
RewriteCond %{QUERY_STRING} ^matching=([^&]+)$ [NC]
RewriteRule ^search/([a-z_]+)/([A-Z_]+)/([a-z]+)/?$ servers.php?game=$1&location=$2&query_by=$3&matching=%1 [NC,L]