• Who is Charles?

    I have been an Internet reviewer, reviewing websites since June 2007.

    Social media has been a phenomenon since 2007. It brings in the true two-way communication between the websites and their visitors. That's what Web 2.0 is all about. I aim to review what the world has become, and to give you my opinions and choices.
  •  
  • Want to be reviewed?

    Over at my blog, I review you at no cost. But I will not be obliged to write reviews about your website, nor will I be obliged to write reviews positively. It is purely from my own point of view. There will have no deadline for me to finish any reviews if I am going to take up.

    Please prepare your product ready for me before contacting me. Thanks. :)
  •  

Subscribe to this blog

Subscribe to full feed RSS
What the? RSS?!

Subscribe Via Email

We respect your privacy.

Problem With Trailing Slash For WordPress in Godaddy

By Charles On July 12, 2007 Under Charles Ramblings

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

  1. I have asked for help at Google Group.
  2. I have checked WordPress help with two results. (link1, link2).
  3. I have installed Permalink Redirect wordpress plugin.
  4. I have tried searching the web and found this (link1) while Dorkarl from Google Group also referred me to there.
  5. Dorkarl also referred me to this site too. (link2)
  6. 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:

  1. Download the Permalink Redirect wordpress plugin and install and activate.
  2. Configure your WordPress
    Go to Options => Permalinks => Custom, specify below
    /%year%/%monthnum%/%day%/%postname%.html
  3. Go to Options => Permalink Redirect => Old Permalink Structure
    /%year%/%monthnum%/%day%/%postname%/
  4. 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’) . ‘/’;

  5. 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…






If you like this post, please subscribe to my RSS feed to receive more updates.

Related Posts

  • No Related Posts
3 comments - add yours

[...] remember back in July when I was having problem using wordpress on Godaddy. After trying all ways to find out how to solve that trailing slash problem, I gave up and move on [...]

[...] Charles Online Review Element – “Problem with Trailing Slash for WordPress in GoDaddy“ [...]

deleter23

October 19, 2008

Thank you very much ;-)