Hide / rewrite download link

You can use the plugin “Download Monitor” I use it and works great. You could also set custom configuration in your wp-config.php file to use a different directory. Depends on whether or not you want to just hide wp-content as the directory or actually completely change it.

How to create User friendly URL in WordPress?

There is a simple solution for this. Add this code to your theme’s functions.php. After that you need to re-save your permalinks from Settings->Permalinks in WordPress dashboard. function remove_author_base() { /** * Remove Author base from Wp Links * Serkan Algur */ global $wp_rewrite; $wp_rewrite->author_base=””; } add_action(‘init’, ‘remove_author_base’, 1); I tested this code on my … Read more

WordPress Post url encoding problem

The only way I know to change the URL in the browser’s address bar is to provide the actual URL in the HREF link that you want to see displayed. If there were a way to change the URL in the browser’s address bar, then that would open up many cans of worms for hackers … Read more

How to change search url produced by ‘s GET method?

My question are these. What is %5B%5D ? How can I change the url like this http://localhost:5757/alpool/?alp-search=true&cat_s=358,399 %5B and %5D are percent-encoded/URL-encoded version of the [ (left square bracket) and ] (right square bracket) characters, respectively. See Percent-encoding reserved characters on Wikipedia. You can “change” it using JavaScript, and here’s an example of how you … Read more

Help with url rewrite

The PHP code is not enough, you need to edit your .htaccess file correspondingly. (You can do this with $wp_rewrite->mod_rewrite_rules(); somehow, or edit it manually.) However, be aware that URL rewriting is complicated stuff – are you sure you need it? If you are using pretty permalinks for posts/pages, chances are this will bork it … Read more

How to rename the WordPress wp-login.php running on IIS6?

I wrote a blog post a while back, this is a quick and dirty hack to make hackers think your wp-login.php is a 404 page. http://dave.kz/hide-your-wp-login-page-from-hackers/. (From blog post) Basically, I’ve added… header(“HTTP/1.0 404 File Not Found”); to the top of the wp-login.php page. Hopefully the attacker is looking for a 200 HTTP response. In … Read more

rewriting an Url

You can customise the way your links are generated by going to the admin menu of WordPress then settings -> permalinks. There will be multiple options to choose from or you may construct a ‘custom’ permalink structure to fit your needs. So in your case, you may want to use the custom structure option and … Read more

URL rewrites af

Use add_rewrite_rule(). function wpse325663_rewrite_resource_type() { add_rewrite_rule(‘^resources\/(.+)/?’, ‘resources/?type=$matches[1]’, ‘top’); } add_action(‘init’, ‘wpse325663_rewrite_resource_type’); An important note from the codex: Do not forget to flush and regenerate the rewrite rules database after modifying rules. From WordPress Administration Screens, Select Settings -> Permalinks and just click Save Changes without any changes.