Apache htaccess 重定向到 404
Apache htacces redirects to 404
我有这个 link 我可以访问:
http://domain.com/search/csgo/US/nameorip/?matching=dust2
.htaccess 看起来像这样:
RewriteRule ^search/([a-z_]+)/([A-Z_]+)/([a-z]+)/?matching=(.*)?$ servers.php?game=&location=&query_by=&matching= [NC,L]
访问此 link 后,我也被重定向到 404 页面。为什么 ?我的 .htacces
文件有什么问题?
编辑:我阅读了文档,我认为问题出在 matching
,对吗?
你可以试试:
RewriteCond %{QUERY_STRING} ^matching=([^&]+)$ [NC]
RewriteRule ^search/([a-z_]+)/([A-Z_]+)/([a-z]+)/?$ servers.php?game=&location=&query_by=&matching=%1 [NC,L]
我有这个 link 我可以访问:
http://domain.com/search/csgo/US/nameorip/?matching=dust2
.htaccess 看起来像这样:
RewriteRule ^search/([a-z_]+)/([A-Z_]+)/([a-z]+)/?matching=(.*)?$ servers.php?game=&location=&query_by=&matching= [NC,L]
访问此 link 后,我也被重定向到 404 页面。为什么 ?我的 .htacces
文件有什么问题?
编辑:我阅读了文档,我认为问题出在 matching
,对吗?
你可以试试:
RewriteCond %{QUERY_STRING} ^matching=([^&]+)$ [NC]
RewriteRule ^search/([a-z_]+)/([A-Z_]+)/([a-z]+)/?$ servers.php?game=&location=&query_by=&matching=%1 [NC,L]