I don’t know if any of you faced the same problem as me. Godaddy’s server configuration don’t seem to work well with WordPress 2.2.1 with regards to how it manages the slash “/” problem. I am so frustrated with this because it keeps on giving me a lot of 404 errors from Google Webmaster Tools… And most of these links I realize were from other websites which tend to think that a slash behind or not does not matter! Well it does matter! It’s a difference between a file or a directory! And Godaddy tends to treat all url without slash behind to be files and keep trying to push their “missing.html” file saying “oops”! I don’t like the “oops” when it is not supposed to be 404!
Asking For Help
- I have asked for help at Google Group.
- I have checked WordPress help with two results. (link1, link2).
- I have installed Permalink Redirect wordpress plugin.
- I have tried searching the web and found this (link1) while Dorkarl from Google Group also referred me to there.
- Dorkarl also referred me to this site too. (link2)
- I asked GoDaddy’s help but Jason P. from Godaddy replied “I am sorry, Online Support is not able to assist with coding and scripting issues. We would suggest checking online web design support forums for assistance with this issue. I apologize for any inconvenience.“.
Testing
I did a few tests to see what the real problem lies. I have been trying to change the htaccess. I have been modifying the wordpress code here and there. And I just can’t get it to work at all!
Seems like Godaddy is unable to deal with all links without a slash at the back…
Godaddy’s Competition
I went to see how other servers’ wordpress are doing and realize that they don’t face any problem with it. In fact, they treated without slash the same as with slash! So amazing that other hosts are doing well with this.. How I wish they can manage the server balance well too… Especially when a swarm of visitors suddenly came to see you…
My Solution For All Godaddy users
I think we all share the same problem and I am really unhappy about it. And because I feel Godaddy has a stable hosting solution, I tried to look for a workaround solution which seem to work well now. Hopefully it continues to work for you too!
Step by step solution:
- Download the Permalink Redirect wordpress plugin and install and activate.
- Configure your WordPress
Go to Options => Permalinks => Custom, specify below
/%year%/%monthnum%/%day%/%postname%.html
- Go to Options => Permalink Redirect => Old Permalink Structure
/%year%/%monthnum%/%day%/%postname%/
- Ftp into your server. Edit this file /wp-includes/category-template.phpLook under this function get_category_link($category_id) and look for this line
$catlink = get_option(’home’) . user_trailingslashit($catlink, ‘category’);
Change to:
$catlink = get_option(’home’) . user_trailingslashit($catlink, ‘category’) . ‘/’;
- Done.
In this solution,
- we are going to forget about the link without “/” at the back. We are going to adopt a new linking system whereby every page is treated like a html file.
- We are going to redirect all the past workable urls with “/” to “.html”. The non-workable No-Slash is not configurable else, I could have just redirect all “no-trailing-slash” to trailing-slash urls…
- And while we are doing this, I realize Godaddy doesn’t amend the “/” properly for category links, hence I have to modify the code there to make the linking system correctly… (Hopefully it doesn’t screw up the whole wordpress…)
Conclusion
Hope it works well for the next few months… This solution is definitely not going to be permanent because WordPress will keep improving in versions.. And I heard that the previous versions seem to work well but I am not sure if they were from Godaddy. I might be moving host next year… See how the upcoming versions of WordPress is going to improve…
|