php - How can achieve a clean URL redirect -


so have form when submitted executes php file containing following redirect.

echo '<meta http-equiv="refresh" content="0;url='.$nexturl.'" />'; 

as people know isn't clean/proffesional way of redirecting.

is possible include file containing redirect using header location, require variable created in process.php file.

for example create using php include:

<?php include (templatepath . '/redirect.php'); ?> 

then within redirect.php

header('location: '.$newurl); 

yes can redirect (that is: set/reset/unset header want) long no output happend before

(none, not whitespace or bom (utf-8 byte order mark) - iirc)

in case have output can capture via ob_start , output if afterwards

oddly enough: made quite clear in doc


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -