Hi Guys
Ok so i've uploaded a pdf file to the media library
http://www.epicwealth.co.uk/wp-content/uploads/2013/04/epic-disclaimer.pdf
All good
However I want to use this link to link to it
http://www.epicwealth.co.uk/disclaimer
What's the best way to do this, ideally from within Wordpress?
Needs to be client friendly so plugin suggestions would be best.
Many thanks
Steve
Navjot Singh answers:
Try [[LINK href="http://wordpress.org/extend/plugins/redirection/"]]Redirection[[/LINK]] Plugin.
Navjot Singh comments:
Or Use this [[LINK href="http://wordpress.org/extend/plugins/safe-redirect-manager/"]]Safe Redirect[[/LINK]] Plugin. It is much lighter than the Redirection one which does too many things for a simple task.
Dbranes answers:
Here is another way to do it, if you don't want to use a plugin:
function custom_redirect() {
if ( is_page('disclaimer') ) { wp_redirect("http://www.epicwealth.co.uk/wp-content/uploads/2013/04/epic-disclaimer.pdf"); exit();}
}
add_action('wp', 'custom_redirect');
if your page slug is "disclaimer".
Steve Watson comments:
Brilliant thanks. I now know something new which is great.
Francisco Javier Carazo Gil answers:
Steve,
You need to do a redirection, something like this will be useful: http://wordpress.org/extend/plugins/redirection/
Francisco Javier Carazo Gil comments:
The one told by Navjot is the best option, if not try one of this others: http://www.aowaa.com/5-wordpress-301-redirect-plugin/
daas answers:
Hi there,
add this code to functions.php
add_action('after_switch_theme', 'wp49547_rewrite');
function wp49547_rewrite()
{
add_rewrite_rule("^disclaimer/?", home_url('wp-content/uploads/2013/04/epic-disclaimer.pdf'), 'top');
}
and then go to settings->permalinks, click save to flush rewrite rules.