.htaccess

Deranged

Uzman üye
3 Ara 2015
1,020
0
İstanbul
Arkadaşlar Sitemde Yapmak İstediğim Bazı Olaylar Var Mesela http://www.siteadı.comwww.siteadı.com[/URL] adresini siteadı.com' a yönlendirmek istiyorum sonrasında siteadı.com/home ve siteadı.com/index.php lınklerınıde sıteadı.com adresıne yonlendırmek ıstıyorum vede siteadı.com/contact.php adresını siteadı.com/contact olarak yonlendırmek ıstıyorum bu son dedıgım aslında www. adında yonlenıyor ancak sıteadı.com duz olarak yaptıgımda /contact olarak yonlenmıyor bu dediklerimi aslında hep denedim nedense olmadı htaccess kodlarım aşağıda inceleyip yardım edebilirmisiniz ?

Kod:
RewriteOptions inherit
Options +FollowSymlinks

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.siteadi\.com [NC]
RewriteRule ^(.*)$ http://siteadi.com/$1 [L,R=301]


RewriteCond %{HTTP_HOST} ^http://siteadi.com/home [NC,OR]
RewriteCond %{HTTP_HOST} ^http://siteadi.com/index.php [NC]
RewriteRule ^(.*)$ http://siteadi.com/$1 [L,R=301,NC]


RewriteCond %{HTTPS} on
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}


RewriteRule ^home.*$ index.php [NC]
RewriteRule ^add.*$ add.php [NC]
RewriteRule ^cate.*$ category.php [NC]
RewriteRule ^info.*$ info.php [NC]
RewriteRule ^visit.*$ visit.php [NC]
RewriteRule ^search.*$ search.php [NC]
RewriteRule ^contact.*$ contact.php [NC]
RewriteRule ^promo.*$ promo.php [NC]
RewriteRule ^404.*$ 404.php [NC]
Not* : Reklam Olmasın Dıye sıtemın adresını siteadi.com olarak değiştirdim

Dosyayı Tekrar Düzenledim

Kod:
RewriteEngine on

# Redirect to domain without www.
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule .* http://%1%{REQUEST_URI} [R=301,L]
# Same for HTTPS:
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule .* https://%1%{REQUEST_URI} [R=301,L]

# Redirect to another domain: siteadi.com.
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} !^(www\.)?siteadi\.com$ [NC]
RewriteRule .* http://siteadi.com%{REQUEST_URI} [R=301,L]
# Same for HTTPS:
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} !^(www\.)?siteadi\.com$ [NC]
RewriteRule .* https://siteadi.com%{REQUEST_URI} [R=301,L]

# 301 Redirect URLs.
Redirect 301 /www.siteadi.com http://siteadi.com
Redirect 301 /siteadi.com/home http://siteadi.com
Redirect 301 /siteadi.com/index.php http://siteadi.com

#301 Redirect Entire Directory.
RedirectMatch 301 ^/index\.php/(.*)$ /home/$1
RedirectMatch 301 ^/add\.php/(.*)$ /add/$1
RedirectMatch 301 ^/category\.php/(.*)$ /cate/$1
RedirectMatch 301 ^/info\.php/(.*)$ /info/$1
RedirectMatch 301 ^/visit\.php/(.*)$ /visit/$1
RedirectMatch 301 ^/search\.php/(.*)$ /search/$1
RedirectMatch 301 ^/contact\.php/(.*)$ /contact/$1
RedirectMatch 301 ^/promo\.php/(.*)$ /promo/$1
RedirectMatch 301 ^/404\.php/(.*)$ /404/$1

# Custom error pages.
Error******** 404 /404.php
Boyle Bır Duzenleme Yaptım Ancak Calısmayan Hayla www Yonlendırmesını siteadi.coma yonlendıremıyorum ve dizinleri yanı /index.php ve /home dizinlerini site adresine siteadi.com olarak yonlendıremıyorum Nasıl Yapıcam
 
Moderatör tarafında düzenlendi:
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.