SELECT DISTINCT t1.docId FROM c_tag_doc t1
INNER JOIN
c_tag_doc t2
ON
t2.tagId IN(12357,18326,10273,10274,10275,10276,10277,10278,10279,10280,10281,10282,10283,10284,10285,10286,10287,12576,12577,12578,12579,12580,12581,12582,12583,12584,12585,12586,12587,12588,12589,12590)
AND t1.docId = t2.docId
INNER JOIN
c_tag_doc t3
ON
t3.tagId IN(12357,18326,10273,10274,10275,10276,10277,10278,10279,10280,10281,10282,10283,10284,10285,10286,10287,12576,12577,12578,12579,12580,12581,12582,12583,12584,12585,12586,12587,12588,12589,12590)
AND t2.docId = t3.docId
INNER JOIN
c_tag_doc t4
ON
t4.tagId IN(2001,2002)
AND t3.docId = t4.docId
INNER JOIN
c_tag_doc t5
ON
t5.tagId IN(863,8000,8001,11131,11132,11222,11224,11225,11226,11307,14032,14697,18441,18442,18443,18571,18572,18573,18574,18576,18577,18578,18587,19185,19186,19226,19767,19799,19800,19801,19802,19803,19804,19805,19806,9010,9004,9005,9006,9009,9007,9008,9011,9013,14705,19172,19173,19174,19175,19176,19177)
AND t4.docId = t5.docId
LIMIT 100
location ~* ^/([a-z]{2})/?$ {
rewrite ^(.*)$ /index.php?$args;
}
location ~* ^/([a-z]{2}) {
rewrite ^(.*)$ /index.php?$args;
}