qoidalarni qayta yozish

Quyidagi qoidalar bilan rewrite.php faylim bor

$rewrites = array(
'#^/searchresults.html$#' => '/info/searchresults'

);

$reverseRewrites = array (
'#^/info/searchresults$#' => '/searchresults.html'

);

bu ishni bajaring va menga to'g'ri sahifa terish moslamalarini bering.html ammo Google maxsus qidiruvi bilan chunki xato sahifasi topilmadi, chunki  searchresults sahifasining formati:

http://site.com/searchresults.html?cx=partner-pub-***********&cof=FORID%3A10&ie=UTF-8&q=***&sa=Search&siteurl=site.com%2F

shuning uchun menga ushbu url uchun to'g'ri qayta yozish qoidasini kiritishimga yordam bera olasizmi?

0

1 javoblar

Ushbu rewriteslar uchun foydalanadigan API nima ekanligiga ishonchim komil emas, lekin muammo regex kodi .html dan keyin tugaydi va shuning uchun u sizning so'rovlaringiz qatoriga mos kelmaydi. Bunga yordam berishi mumkin:

$rewrites = array(
'#^/searchresults.html(|\?.*)$#' => '/info/searchresults$1'

);

$reverseRewrites = array (
'#^/info/searchresults(|\?.*)$#' => '/searchresults.html$1'

);
1
qo'shib qo'ydi
mm ishlamayapti
qo'shib qo'ydi muallif grigione, manba
To'g'ri, faqat birinchi $ rewrites = array ('# ^/searchresults.html (| \.. *) $ #' => '/ info/searchresults $ 1') joylashtirildi. va ikkinchisiga shikoyat qilmang, endi ishlayapsiz
qo'shib qo'ydi muallif grigione, manba
PhP |BotsUz
PhP |BotsUz
93 ishtirokchilar

Phpni o'rganishni Hohlasangiz https://t.me/joinchat/AAAAAE-KRc5dd5tPMmGmWA A'zo bo'lin