• Rejestracja
vBHELP.pl - polskie wsparcie vBulletin
  1. #1
    jaryx jest nieaktywny Użytkownik
    Dołączył
    Feb 2009
    Posty
    96
    Przydatne posty
    1

    Domyślnie vbseo, htaccess i 301

    Nie umiem ustawić przekierowania 301. Mój obecny .htaccess wygląda tak:

    Kod:
    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    RewriteEngine On
    
    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums/)
    RewriteBase /
    
    RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]
    Co powinienem wpisać, żeby mieć takei przekierowania:

    http://*.domena.com.pl - przekierowana 301 na - http://sub.domena.com.pl

    i chyba jeszcze takie coś:

    http://*.sub.domena.com.pl - 301 na - http://sub.domena.com.pl


    Zrobiłem tak:
    Kod:
    RewriteCond %{HTTP_HOST} ^forum.domena.com.pl
    RewriteRule ^(.*)$ http://sub.domena.com.pl/$1 [R=301,L]
    
    RewriteCond %{HTTP_HOST} ^www.forum.domena.com.pl
    RewriteRule ^(.*)$ http://sub.domena.com.pl/$1 [R=301,L]
    
    RewriteCond %{HTTP_HOST} ^www.domena.com.pl
    RewriteRule ^(.*)$ http://sub.domena.com.pl/$1 [R=301,L]
    
    RewriteCond %{HTTP_HOST} ^domena.com.pl
    RewriteRule ^(.*)$ http://sub.domena.com.pl/$1 [R=301,L]
    
    RewriteCond %{HTTP_HOST} ^www.sub.domenta.com.pl
    RewriteRule ^(.*)$ http://sub.domena.com.pl/$1 [R=301,L]
    Działa. Ale czy tak jest poprawnie, czy tylko "na chama" ?
    Ostatnio edytowane przez jaryx ; 13.07.2009 o 18:34
    [COLOR="Blue"][B] Imagination is more important than knowledge - Albert Einstein[/B][/COLOR]



Podobne wątki

  1. vBseo + subdomena = błąd - htaccess
    By Davi in forum vBSEO
    Odpowiedzi: 4
    Ostatni post / autor: 06.11.2010, 13:01
  2. bład .htaccess
    By day-dreamer in forum Pytania i problemy
    Odpowiedzi: 9
    Ostatni post / autor: 15.02.2010, 01:01
  3. .htaccess
    By Krosi in forum vBSEO
    Odpowiedzi: 8
    Ostatni post / autor: 18.11.2009, 21:49
  4. [Zlecę] napisanie pliku 301
    By scorpi in forum Giełda
    Odpowiedzi: 5
    Ostatni post / autor: 19.07.2008, 12:36
  5. vbSEO i htaccess
    By vPoker.pl in forum vBSEO
    Odpowiedzi: 8
    Ostatni post / autor: 11.07.2008, 15:01
Chmurka.pl

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67