Forum Moderators: phranque

Message Too Old, No Replies

Help! Pulling My Hair Out Over HTAccess Problem and Folder Issue

         

atingle

12:20 pm on Sep 18, 2008 (gmt 0)

10+ Year Member



Well I have searched both Google and here but, alas, with no success – and this is in part because I am rather lost as to how to ‘term’ the issue I’m having in searches and I’m pulling my hair out. I hope there’s someone here that can help.

Basically my site appears to have developed a problem that’s starting to cost me quite dearly.

Assuming the site is in the folder example.com/Bog I am suddenly finding that I’m getting pages not found by Google’s Adsense bot which is looking for pages starting example.com/blog (note the lower case ‘b’) for some reason, and is therefore starting to cost me.

I have noticed on there sites with the same structure will take example.com/blog and redirect to example.com/Blog but mine simply gives a 404 error.

How on earth can I fix this so that Google’s Adsense bot (or another other bot for that matter), when going to example.com/blog is directed straight to example.com/Blog so it can ‘re-find’ the pages?

I have no idea why this started happening this week as my sitemap and everything is and has always been /Blg and not /blog but this is now occurring and its causing me major issues.

Your help would be very, very much appreciated.

g1smd

2:21 pm on Sep 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



This might do it:

RewriteRule blog(.*) http://www.domain.com/Blog$1 [R=301,L]

Proceed with extreme caution. Modifying the server settings can cause many unintended consequences.

Test with a very large selection of expected and unexpected test URLs, and do use a HTTP Headers Viewer to really see what is going on.

Finally, I always use all lower-case for all URLs purely to avoid all problems with URL casing.

atingle

2:28 pm on Sep 18, 2008 (gmt 0)

10+ Year Member



Thank you, g1smd. I think I will go down the lowercase route actually. Thank you for your help, I really have no idea at all about HTAccess. Much appreciated