পিএইচপি পৃষ্ঠা থেকে URL এ পুনঃনির্দেশ। পিএইচপি 301 পুনঃনির্দেশ।
এই পিএইচপি রিডাইরেকশনটি HTTP প্রতিক্রিয়া স্ট্যাটাস কোড ফিরিয়ে দেবে: 301 স্থায়ীভাবে সরানো হয়েছে।
সার্চ ইঞ্জিন 301 রেসপন্স স্ট্যাটাস কোড ব্যবহার করে পুরনো ইউআরএল থেকে নতুন ইউআরএলে পেজ র্যাঙ্ক স্থানান্তর করতে।
old-page.php কোডকে নতুন-page.php-এ পুনর্নির্দেশ কোড দিয়ে প্রতিস্থাপন করুন।
old-page.php:
<?php
// PHP permanent URL redirection
header("Location: http://www.domain.com/new-page.php", true,
301);
exit();
?>
পুরানো পৃষ্ঠায় .php ফাইল এক্সটেনশন থাকতে হবে।
নতুন পেজ যেকোন এক্সটেনশনের সাথে হতে পারে।
php-redirect-test.php
<?php
// PHP permanent URL redirection test
header("Location:
https://cmtoinchesconvert.com/bn/web/dev/php-redirect.html", true, 301);
exit();
?>
php-redirect-test.php থেকে এই পৃষ্ঠায় পুনঃনির্দেশিত করতে এই লিঙ্ক টিপুন:
পিএইচপি পুনঃনির্দেশ পরীক্ষা - পিএইচপি ফাইল
php-redirect-test.htm
<?php
// PHP permanent URL redirection test
header("Location:
https://cmtoinchesconvert.com/bn/web/dev/php-redirect.html", true, 301);
exit();
?>
html ফাইল php-redirect-test.htm থেকে পিএইচপি পুনঃনির্দেশ সাধারণত .html ফাইল এক্সটেনশনের কারণে কাজ করবে না, যদি না এটি .htaccess বা httpd.conf ফাইলে সক্রিয় করা হয়:
পিএইচপি পুনঃনির্দেশ পরীক্ষা - এইচটিএমএল ফাইল
HTML ফাইলে PHP সক্রিয় করতে এই কোডটি .htaccess বা httpd.conf ফাইলে যোগ করুন:
Addtype application/x-httpd-php .htm .html
Advertising