Site icon Hip-Hop Website Design and Development

wordpress administrator ajax url rename

I went over this point : How would i be able to rename the WordPress AJAX URL? on attempting to rename the url for the administrator ajax.php record. I attempted the code recommended by Krzysiek Dróżdż which is this

//This will change the url for administrator ajax.php to/ajax/ 

work modify_adminy_url_for_ajax( $url, $path, $blog_id ) { 

on the off chance that ( 'administrator ajax.php' == $path ) { 

$url = site_url('/ajax/'); 

} 

return $url; 

} 

add_filter( 'admin_url', 'modify_adminy_url_for_ajax', 10, 3 ); 

and

RewriteRule ^/?ajax/?$/wp-administrator/administrator ajax.php?&%{QUERY_STRING} [L,QSA]

But I am getting post 404’s under the renamed/ajax/url and was thinking about the thing I could be fouling up and if this code would in any case deal with more up to date forms ?

Thanks.