301 Redirect only for posts

You’ll have to modify your old theme’s function.php. Add the following code: function redirect_posts() { global $post; if ($post->post_type==’post’) { return header(‘location:http://newblog.com/posts/’.$post->post_name); } } add_action(‘wp’, ‘redirect_posts’); The if codintion will check if the page what’s currently viewed is a post and it returns a header redirect to the new blog based on the old blog … Read more

Redirect attachment URL

You can do this in code, htaccess, or go the fastest way to get it done reliably using a redirection plugin. Here are three redirection plugins vetted by WordPress VIP: https://vip.wordpress.com/plugins/safe-redirect-manager/ https://vip.wordpress.com/plugins/wpcom-legacy-redirector/ https://vip.wordpress.com/plugins/external-permalinks-redux/ And here’s a link to the one I use on sites: https://wordpress.org/plugins/redirection/ (glance at the number of active installs 400,000+)

Redirecting Issue

Okay, after much poking around I decided to try reinserting the redirects and it worked again! In my poking I discovered that my browser (Chrome) was caching my .htaccess page so what I was seeing was different to what was actually saved in the file. Not sure if it’s an issue with the host (Hetzner) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)