Simple Machines Community Forum

SMF Support => Türkçe Bölümü (Turkish) => Language Specific Support => Arşiv => Topic started by: eren on January 13, 2009, 07:26:03 PM

Title: Htaccess ile yönlendirme
Post by: eren on January 13, 2009, 07:26:03 PM
http://www.adres.com/index.php?topic=0.0

şeklinde forum mevcuttu ancak forumu alt alana taşıdım.

http://forum.adres.com/index.php?topic=0.0

oldu.

.htaccess dosyasını şu şekilde düzenledim ama olmadı.

QuoteOptions +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^www.adres.com [nc]
rewriterule ^(.*)$ http://forum.adres.com/$1 [r=301,nc]

İstediğim;

http://www.adres.com/index.php?topic=0.0

adresine girenlerin

http://forum.adres.com/index.php?topic=0.0

adresine ulaşması ve bu işlemin tüm forum konuları için geçerli olması.

Tabi www.adres.com da açık kalacak ve isteyen ulaşabilecek.

htaccess konusunda çok fazla bilgiye sahip değilim ve bu yüzden bununla ilgili yardım rica ediyorum. Teşekkürler.
Title: Re: Htaccess ile yönlendirme
Post by: eren on January 13, 2009, 07:36:05 PM
QuoteRewriteEngine on
RewriteCond %{HTTP_HOST} ^www.adres.com/index.php?board=$ [OR]
RewriteCond %{HTTP_HOST} ^adres.com/index.php?board=$
RewriteRule ^/?$ http://forum.adres.com/index.php?board=$ [R=301,L]

Bunun çalışması lazım değil mi?
Title: Re: Htaccess ile yönlendirme
Post by: recep34 on January 13, 2009, 08:15:23 PM
tamamda htaccess de url ler sef değil,ama ilk mesajdakiler sef.
index.php?board=$ nasıl index.php/topic, i yönlendirsin...
Title: Re: Htaccess ile yönlendirme
Post by: eren on January 13, 2009, 08:43:13 PM
Quote from: recep34 on January 13, 2009, 08:15:23 PM
tamamda htaccess de url ler sef değil,ama ilk mesajdakiler sef.
index.php?board=$ nasıl index.php/topic, i yönlendirsin...

O zaman ne yapmalıyım?
Title: Re: Htaccess ile yönlendirme
Post by: eren on January 13, 2009, 08:48:48 PM
http://www.adres.com/index.php?topic=0.0

bu adresi

http://forum.adres.com/index.php?topic=0.0

bu şekilde yönlendirse de olur sorun değil.

Şu an yönlendirme oluyor ilk verdiğim kod ile ama forum dışındaki alanları da yönlendiriyor. Örneğin www.adres.com/abidik gibi alakasız bir alanı da forum.adres.com/abidik adresine yönlendiriyor. Ben bunu istemiyorum.

Cevaplar için teşekkürler.
Title: Re: Htaccess ile yönlendirme
Post by: #snr on January 14, 2009, 08:51:16 AM
Quote from: eren on January 13, 2009, 07:36:05 PM
RewriteEngine on
kodundan sonra

RewriteBase /forum yazmayı denediniz mi?
Title: Re: Htaccess ile yönlendirme
Post by: €®Ю€∏∏----® on January 14, 2009, 08:59:01 AM
onu öyle yapamazsınız DirecAdmin paneline gir sub domain oluşturman lazım..
Title: Re: Htaccess ile yönlendirme
Post by: recep34 on January 14, 2009, 09:35:27 AM
arkadaş zaten sundomain oluşturmuş.googleda indexli eski subdoaminsiz linklere tıklandığında 404 yerine subdomainli linklere gitsin istiyor...
Title: Re: Htaccess ile yönlendirme
Post by: #snr on January 14, 2009, 10:20:16 PM
o zaman eski klasöre bir index.php dosyası atıp ve içine şu kodu yazarsanız linkler kırılmayacaktır.
<?php include("forum/index.php"); ?>