3 sonuçtan 1 ile 3 arası

Konu: .htaccess dosyası içine mod_rewrite eklemek

  1. #1
    Junior Member
    Üyelik tarihi
    Feb 2012
    Mesajlar
    5
    Tecrübe Puanı
    0

    Standart .htaccess dosyası içine mod_rewrite eklemek

    Kullanıcı dostu bağlantıyı aktif etmek için "URL rewriting (mod_rewrite) is not active on your server, or it is not possible to check your server configuration. If you want to use Friendly URLs, you must activate this mod." böyle bir hata veriyordu.


    Hosting şirketine sordum. mod_rewrite aktif hale getirebilirmiyiz diye.
    Cevap : Aktiftir ama gerekli kodları .htaccess dosyasınıza yazmanız gerekiyor.

    benim şimdi .htaccess dosyasının içine ne ekgerekiyor. .htaccess dosyasının içi böyle.


    PHP- Kodu:
    # ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again
    # .htaccess automaticaly generated by PrestaShop e-commerce open-source solution
    # [url=http://www.prestashop.com]PrestaShop: Ecommerce Software to create your Online Store[/url] - [url=http://www.prestashop.com/forums]PrestaShop Forums[/url]

    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond 
    %{HTTP_HOST} ^www.domain.com$
    RewriteRule . - [E=REWRITEBASE:/]
    RewriteRule ^api/?(.*)$ %{ENV:REWRITEBASE}webservice/dispatcher.php?url=$[QSA,L]

    # Images
    RewriteCond %{HTTP_HOST} ^www.domain.com$
    RewriteRule ^([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$1$2$3.jpg [L]
    RewriteCond %{HTTP_HOST} ^www.domain.com$
    RewriteRule ^([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$1$2$3$4.jpg [L]
    RewriteCond %{HTTP_HOST} ^www.domain.com$
    RewriteRule ^([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$1$2$3$4$5.jpg [L]
    RewriteCond %{HTTP_HOST} ^www.domain.com$
    RewriteRule ^([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$1$2$3$4$5$6.jpg [L]
    RewriteCond %{HTTP_HOST} ^www.domain.com$
    RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6$7.jpg [L]
    RewriteCond %{HTTP_HOST} ^www.domain.com$
    RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7$8.jpg [L]
    RewriteCond %{HTTP_HOST} ^www.domain.com$
    RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8$9.jpg [L]
    RewriteCond %{HTTP_HOST} ^www.domain.com$
    RewriteRule ^([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9$10.jpg [L]
    RewriteCond %{HTTP_HOST} ^www.domain.com$
    RewriteRule ^c/([0-9]+)(\-[\.*_a-zA-Z0-9-]*)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2$3.jpg [L]
    RewriteCond %{HTTP_HOST} ^www.domain.com$
    RewriteRule ^c/([a-zA-Z_-]+)(-[0-9]+)?/.+\.jpg$ %{ENV:REWRITEBASE}img/c/$1$2.jpg [L]
    # AlphaImageLoader for IE and fancybox
    RewriteCond %{HTTP_HOST} ^www.domain.com$
    RewriteRule ^images_ie/?([^/]+)\.(jpe?g|png|gif)$ js/jquery/plugins/fancybox/images/$1.$[L]

    # Dispatcher
    RewriteCond %{REQUEST_FILENAME} -[OR]
    RewriteCond %{REQUEST_FILENAME} -[OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteCond 
    %{HTTP_HOST} ^www.domain.com$
    RewriteRule ^.*$ - [NC,L]
    RewriteCond %{HTTP_HOST} ^www.domain.com$
    RewriteRule ^.*$ %{ENV:REWRITEBASE}index.php [NC,L]
    </
    IfModule>

    #If rewrite mod isn't enabled
    ErrorDocument 404 /index.php?controller=404

    # ~~end~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again 

  2. #2
    Administrator
    Üyelik tarihi
    Oct 2008
    Mesajlar
    2.933
    Tecrübe Puanı
    10

    Standart

    Mod rewrite bileşeni varsa sunucuda ve ana dizinde üstteki htaccess kodları varsa çalışması gerekli. Panelde SEO açıkmı acaba?
    >> Lütfen çözülmüş konularınızın Başlıklarına [ÇÖZÜLDÜ] ibaresi ekleyiniz


    www.kalehosting.com.tr

  3. #3
    Junior Member
    Üyelik tarihi
    Feb 2012
    Mesajlar
    5
    Tecrübe Puanı
    0

    Standart

    Panelde seo açık.

    Şifreleri veriyimde siz bir yardımcı olun.

Bookmarks

Yetkileriniz

  • Konu Acma Yetkiniz Yok
  • Cevap Yazma Yetkiniz Yok
  • Eklenti Yükleme Yetkiniz Yok
  • Mesajınızı Değiştirme Yetkiniz Yok
  •  
Hakkımızda
2008'den beri sizlere PrestaShop ile ilgili teknik destek vermeyi amaçlayan sitemiz, şu anda 13.000 den fazla üye 15.000'e yakın mesaj ile kararlı bir biçimde yoluna devam etmektedir. Ayrıca PrestaShop dışında diğer sistem ve eticarete yönelik paylaşımlar ve konularada elimizden geldiğinde yanıtlamaya çalışıyoruz. Ayrıca eticarete yeni başlayan ve tecrübeli kişileri bir araya getirerek ortak bir paydada buluşturmayı amaçlamaktayız.
Sosyal Medya

Search Engine Optimization by vBSEO 3.6.0