senters Posted July 1, 2012 Report Posted July 1, 2012 Kā bez htaccess redirektiem panākt, lai ierakstot www.lapa.lv atvertos www.lapa.lv/intro/ man bija šādi, bet tas googles seo nemaz nepatīk, bļauj par 302 not followed erroriem if (empty($_SESSION['visited']) || $_SESSION['visited'] < 3) { header('Location: http://www.lapa.lv/intro/'); $_SESSION['visited'] = empty($_SESSION['visited']) ? 1 : $_SESSION['visited'] + 1; } Quote
waplet Posted July 1, 2012 Report Posted July 1, 2012 Iespējams tāpēc, ka sanāk, ka 3 reizes parādīs intro? Quote
blackhalt Posted July 2, 2012 Report Posted July 2, 2012 (edited) Es izmantotu index.html, kur būtu Meta refresh + JavaScript (varbūt) redirekts ,bet ja gribi ar PHP, tad es darītu šādi: <?php header('HTTP/1.1 301 Moved Permanently'); header('Location: http://www.lapa.lv/intro/'); /* Redirect browser */ /* Make sure that code below does not get executed when we redirect. */ exit; ?> Edited July 2, 2012 by blackhalt Quote
senters Posted July 2, 2012 Author Report Posted July 2, 2012 es gribētu iztikt bez 301 redirekta, jo tas traucē seo. Quote
blackhalt Posted July 2, 2012 Report Posted July 2, 2012 Liec visu www.lapa.lv/ nevis www.lapa.lv/intro/ Es īsti nesaprotu kāda jēga no tā, ka saturs tiek ielikts kaut kādā apakšdirektorijā. Quote
senters Posted July 2, 2012 Author Report Posted July 2, 2012 laikam tā arī būs jādara, jāliek viss intro saturs iekš index un to rādīs vienmēr apmeklētājiem Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.