/ Published in: PHP
A handy little page template for making a page redirect to any url. To use save the code as redirect.php, upload to your theme directory, and then when making a page select "redirect" as your page template. Then just enter ONLY the url you want to redirect to in the body copy for that page.
Expand |
Embed | Plain Text
<?php /* Template Name: Redirect */ if (have_posts()) { the_post(); $pattern = '@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@'; } ?>
You need to login to post a comment.
