Walking in Light with Christ - Faith, Computing, Diary |
How to fix bug with WordPress domain extra trailing slash (Double wordpress trailing slash) Posted: 09 Jul 2012 05:22 AM PDT 2 of the wordpress installations, I take care for had been reported an annoying bug today by some colleagues. As a result in the urls everywhere there was the double trailing slash appearing i.e.:: etc. The bug was reported to happen in the multiolingual version of the wordpress based sites, as the Qtranslate plugin is used on this installations to achieve multiple languages it seemed at first logical that the double slash domain and url wordpress issues are caused for some reason by qTranslate. Therefore, I initially looked for the cause of the problem, within the wordpress admin settings for qTranslate plugin. After not finding any clue pointing the bug to be related to qTranslate, I've then checked the settings for each individual wordpress Page and Post (There in posts usually one can manually set the exact url pointing to each post and page). The double slash appeared also in each Post and Page and it wasn't possible to edit the complete URL address to remove the double trailin slashes. My next assumption was the cause for the double slash appearing on each site link is because of something wrong with the sites .htaccess, therefore I checked in the wp main sites directory .htaccess
# Rewrite rules for new content and scripts folder # Disable direct acceees to wp files if referer is not valid # Standard WordPress rewrite Onwards, I thought a possible way to fix bug by adding mod_rewrite rules in .htaccess which would do a redirect all requests to http://www.our-company-domainname.com//contact-us/ to http://www.our-company-domainname.com//contact-us/ etc. like so: This for unknown reasons to me didn't worked either, finally thanks God I remembered to check the variables in wp-config.php (some month ago or so I added there some variables in order to improve the wordpress websites opening times). I've figured out I did a mistake in one of the variables by adding an ending slash to the URL. The variable added was: whether instead it should be without the ending trailing slash like so: By removing the ending trailing slash: to: Related Posts |
How to fix bug with WordPress domain extra trailing slash (Double wordpress trailing slash) Posted: 09 Jul 2012 05:22 AM PDT 2 of the wordpress installations, I take care for had been reported an annoying bug today by some colleagues.
As a result in the urls everywhere there was the double trailing slash appearing i.e.::
etc. The bug was reported to happen in the multiolingual version of the wordpress based sites, as the Qtranslate plugin is used on this installations to achieve multiple languages it seemed at first logical that the double slash domain and url wordpress issues are caused for some reason by qTranslate. Therefore, I initially looked for the cause of the problem, within the wordpress admin settings for qTranslate plugin. After not finding any clue pointing the bug to be related to qTranslate, I’ve then checked the settings for each individual wordpress Page and Post (There in posts usually one can manually set the exact url pointing to each post and page).
|
You are subscribed to email updates from Walking in Light with Christ - Faith, Computing, Diary To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
0 Komentar
Penulisan markup di komentar