Content duplication issue with dynamic URLs

This issue is not necessarily with wordpress, rather Google allows you to exclude specific url parameters. So you should exclude the session_id parameter, and possible others… have a look around the Craw->url parameters section of you webmaster account. There are a number of different options, depending on what the roles of your parameters are. https://www.google.com/webmasters/tools/crawl-url-parameters?

Avoid the removal of “https:” from URLs

It was caused by CloudFlare https (which doesn’t set the $_SERVER[‘HTTPS’] variable), I solved it by forcing: $_SERVER[‘HTTPS’] = ‘on’; in the webserver configuration. After doing so I could also disable the CloudFlare Flexible SSL plugin, and get a little performance gain.

Newline URL entity when using esc_url()

Background: WordPress strips out %0A from URL because in general newline has no practical purpose in URL. Unless it’s a mailto: protocol, WordPress strips out %0A. So it’s better not to use them in URL at all. Solution: Still, if for any specific purpose you have to use %0A, you may use %250A and then … Read more

Remove Trailing Slash from Category Base and Tag Base

I did a lot of digging and I came up with this code to solve the problem as well as adding “.html” to pages, categories and tags. The permalink setting takes care of posts. function hpct_page_rewrite($rules) { foreach ($rules as $key => $value) { $newrules[str_replace(‘/?’, ‘.html’, $key)] = $value; } return $newrules; } function hpct_page_link($link) … Read more

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