need to add redirect rule via function.php
-
Hi,
I am facing issue with the url redirect.
When i added url redirect code to the .htacess file the code working successful , but i can not upload image at admin.
I need to add the url redirect rule at the .htacess via functions.php but i am not getting how to do that.
Previously posted forums for the same topic gave me the following codefunction ftc_flush_rewrites() { global $wp_rewrite; $wp_rewrite->flush_rules(); } function ftc_add_rewrites() { global $wp_rewrite; $wp_rewrite->non_wp_rules = array( '(.*)’(.*)$' => '$1$2' ); } add_action('init', 'ftc_add_rewrites'); add_action('admin_init', 'ftc_flush_rewrites');[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been damaged by the forum’s parser.]
Which is not working for me.
Please guide me how to do that.
My current version for the wordpress is 4.5
The topic ‘need to add redirect rule via function.php’ is closed to new replies.