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.
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?
tamamda htaccess de url ler sef değil,ama ilk mesajdakiler sef.
index.php?board=$ nasıl index.php/topic, i yönlendirsin...
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?
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.
Quote from: eren on January 13, 2009, 07:36:05 PM
RewriteEngine on
kodundan sonra
RewriteBase /forum
yazmayı denediniz mi?
onu öyle yapamazsınız DirecAdmin paneline gir sub domain oluşturman lazım..
arkadaş zaten sundomain oluşturmuş.googleda indexli eski subdoaminsiz linklere tıklandığında 404 yerine subdomainli linklere gitsin istiyor...
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"); ?>