Welcome to WebmasterWorld Guest from 54.227.1.130

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Can you redirect linking mistakes with .htaccess?

Like periods at the end of links from other sites

     

hannamyluv

7:48 pm on Jan 2, 2013 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I regularly review my 404 errors and I notice that most of them are from errors in links from other sites. The most common example would be when they link to my site, but the link is at the end of a sentance and the period gets tossed into the link as well.
e.g.
good = http://www.example.com/category/cool-widgets.php
bad = http://www.example.com/category/cool-widgets.php.

Can I make a general rule in the .htaccess that would fix errors like this as they happen (rather than 1 at a time like I do now) and what would that look like?

g1smd

7:50 pm on Jan 2, 2013 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Yes, you can easily add rules for the most common typos - trailing period, comma, semi-colon and quote.

These rules must be early in the htaccess file, long before the non-www/www redirect but after any rules that block access to malicious requests.

lucy24

9:15 pm on Jan 2, 2013 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



... and keep that as a reminder to always check any links you yourself put up. Even if you've just come from the page and pasted directly from your address bar and you know it's the right URL. As in: [webmasterworld.com...] (Moderators! Don't fix that. I was illustrating the point ;))

hannamyluv

3:04 pm on Jan 7, 2013 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Awesome, thank you for the help. :)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month