redirect - How to Make Header Location 301 in PHP via Coding

740

i have these codes work fineecho $data[''.$itag.'']['url'] for get link url but when i use this codes for redirect 301 header location this code is not work please any one tell what i can do with this code for get 301 header location

<?php header("Location: "echo $data[''.$itag.'']['url']"", true, 301); exit();?>

please suggest for this codes

16

Answer

Solution:

<?php 
    header("Location: ".$data[$itag]['url'], true, 301); 
    exit();
?>

People are also looking for solutions to the problem: php - woocommerce product attribute, how to filter between two values

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.