v2.5.2
Giriş yap

Php header location

zeldris1462
381 defa görüntülendi ve 1 kişi tarafından değerlendirildi

seo url le ile yonlendirme yapamadım Bilen varsa el atsın

Cevap yaz
Cevaplar (2)
emmir2
741 gün önce

Tabi efendim

codepacks
741 gün önce

header("Location: http://localhost/"); gidilecek alan veya dosya tanımlaması

veya
header("Refresh: 3; http://localhost/"); 3 saniye sonra gidilecek

yada
htaccess ile tek sayfa yönlendirme

RewriteEngine On
RewriteRule ^url.html(.*)$ /yeni.html [L,R=301]

RewriteRule ^url.php(.*)$ /yeni.php [L,R=301]

daha fazla
php hariç örnek (site.com/sayfa.php yerine sayfa site.com/sayfa) htaccess

RewriteEngine On
Options -Indexes
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin "*"
</IfModule>

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php