How to – proper WordPress 301 redirects?

You may be adding the directive to the wrong part of your .htaccess file? It needs to go at the top, before the existing WordPress directives. You should also use RewriteRule (ie. mod_rewrite) since you have existing mod_rewrite directives (the WP front controller).

Something like your 3rd attempt at the top of your .htaccess file should result in the appropriate redirect. For example:

RewriteRule ^service-1\.html$ /our-services/1/? [R=302,L]

Change to a 301 (if that is the intention) only when you are sure it’s working OK. 301s are cached hard by the browser, so you will need to ensure the browser cache is cleared before testing.

The ? on the end of the RewriteRule substitution simply removes the query string from the request. Whether this is required or not is up to you, but you don’t have a query string in your example.

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