Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 1384
Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 700
Warning: Invalid argument supplied for foreach() in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 707
Warning: preg_match_all(): Compilation failed: invalid range in character class at offset 4 in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 700
Warning: Invalid argument supplied for foreach() in /home/klient.dhosting.pl/trajluk/zenbox/seo.trajdos.pl/public_html/wp-content/plugins/lightbox-plus/classes/shd.class.php on line 707
Potrzeba ustawienia przekierowania 301 w przypadku zarządzania jakimkolwiek serwisem pojawia się zawsze, czasem rzadziej, czasem częściej. Często w takiej sytuacji wykorzystywany jest plik .htaccess (tam gdzie jest to możliwe). Ale czasami właściciel witryny albo nie chce, albo nie potrafi, albo nie może skorzystać z tej możliwości. Co wtedy?
Zastosowania przekierowań w WordPress
Przekierowania w przypadku strony działającej z wykorzystaniem WordPressa, ale też tak naprawdę w przypadku każdej strony mogą się przydać wtedy kiedy:
- strona zmieni adres,
- strona zostanie usunięta,
- nastąpiła zmiana CMS na WordPress,
- co najmniej dwie strony łączone są w 1,
- i wiele innych.
W przypadku WordPressa najlepszym rozwiązaniem będzie zainstalowanie wtyczki Redirection, która pozwala bez problemu zrealizować praktycznie wszystkie scenariusze przekierowań.
Przykład wykorzystania wtyczki Redirection do konfiguracji przekierowań
Najlepiej sprawdzić w praktyce jak to działa. W narzędziach dla Webmasterów Google otrzymałem jakiś czas temu, że jedna strona powoduje błąd 404. Do tej pory ignorowałem ten problem, ale w końcu przyszedł odpowiedni czas, żeby się tym zająć.

Szukając sposobu na rozwiązanie problemu poszukałem odpowiedniej wtyczki, czyli Redirection, która pozwala nie tylko ustawić przekierowanie, ale też śledzić statystyki związane z przekierowaniami i wyświetlaniem stron powodujących błąd 404.

Ustawienie przekierowania jest bardzo proste. Należy podać adres strony, która ma być przekierowana. I adres strony, na którą ma być wykonane przekierowanie.
Do wyboru są przekierowania 301, 302 i 307. Dodatkowo każda reguła może działać w trybie dopasowania zwykłego jak i do wyrażenia regularnego.
Wtyczka WordPress Redirection
Wtyczka dostępna jest na stronie https://wordpress.org/plugins/redirection/ lub w panelu WordPressa w zakładce Wtyczki.
Po zainstalowaniu wtyczka dostępna jest w zakładce NARZĘDZIA > PRZEKIEROWANIA. Główne funkcje wtyczki to:
- konfiguracja ręczna przekierowań,
- import przekierowań w CSV (u mnie wtyczka miała problem z działaniem, potrzebna była modyfikacja kodu źródłowego),
- zbieranie statystyk wyświetlania stron błędu 404,
- zbieranie statystyk skonfigurowanych przekierowań.
Jak na wtyczkę odpowiedzialną tylko za przekierowania dostarcza ona naprawdę dużo przydatnych informacji.
Podsumowanie
Edycja pliku .htaccess nie zawsze jest prosta, nie zawsze jest możliwa. Skorzystanie z wtyczki Redirection w WordPress pozwala rozwiązać wiele problemów, ale też dostarcza też wiele dodatkowych informacji, które mogą być pomocne w dbaniu o porządek w serwisie.
Wykorzystanie wtyczki jest banalnie proste w związku z czym jej używać każdy, ponieważ do prawidłowego jej użycia wystarczy bardzo podstawowa wiedza.