0

Hi,

I want to do a 301 redirect for one of my pages. What I was wondering is am I still able to execute php code on the same page of the 301 redirect?

If so how?

So far I haven't had luck...

Thanks.

3
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by diafol
0

There are a number of ways to do this. You haven't posted any code or provided specifics. If you use a Meta Refresh to do the re-direct, you should be able to include other code in the same module.

0

There are a number of ways to do this. You haven't posted any code or provided specifics. If you use a Meta Refresh to do the re-direct, you should be able to include other code in the same module.

Thanks for your reply :)

This is the code:

<?PHP 
include "test.php"; 


?>

and

<?PHP


header("HTTP/1.1 301 Moved Permanently");
header("Location: http://sampleplace.com/");
exit();

?>
0

Is there no way to use 301 redirect? As I prefer using it...due to it's SEO capabilities

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.