« Penny StocksBest-practice Web Design Process »
Replacing %23 with # in incoming links
I had some url requests show up in my google sitemaps for one of my sites with “404 Not found” errors for a bunch of urls that had “%23comment-155″ looking urls instead of “#comment-155″
So I had to redirect incoming links that contained
/article.html%23comment-155
/article.html#comment-155
RewriteRule ^(.*).html([^c]+)comment-(.+)$ http://www.site.com/$1.html#comment-$3 [R=301,L,NE]
"GET /htaccess/speed-up-sites-with-htaccess-caching.html%23comment-155 HTTP/1.1" 200 2617 "-"
"GET /htaccess/speed-up-sites-with-htaccess-caching.html%23comment-155 HTTP/1.1" 301 683 "-" "GET /htaccess/speed-up-sites-with-htaccess-caching.html HTTP/1.1" 200 24690 "-"
Users browser is redirected using a Search Engine Friendly 301 Redirect to the correct URL, including anchor!
For more discussion of this problem check out http://www.webmasterworld.com/forum92/5188.htm
« Penny Stocks
Best-practice Web Design Process »
The love of liberty is the love of others; the love of power is the love of ourselves.
-- William Hazlitt
Please consider donating to support active development of the free software and articles here.![]()
The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect. Tim Berners-Lee
No comments yet. Be the first!
It's very simple - you read the protocol and write the code. -Bill Joy
HTML | DCMI | GRDDL | XOXO | XDMP | XFN | DOM | XML | XHTML 1.1 Strict | CSS 2.1 | W3C | TLDP | WAI | DISA | ICSI | GIAC | SANS RR | GHOST | DEFCON | NIST | DHS CYBER | NIST | Phrack
↑ TOPExcept where otherwise noted, content on this site is licensed under a Creative Commons Attribution 3.0 License, just credit with a link.
This site is not supported or endorsed by The Apache Software Foundation (ASF). All software and documentation produced by The ASF is licensed. "Apache" is a trademark of The ASF. HTTPD based on NCSA HTTPd