htaccess Rewrite and indirect linking
There are two methods of rewriting URL’s. I mean besides the right way and the wrong way… URL’s can be rewritten to mimic files or directories. While directory rewrites may seem like a good way to handle very long strings of info, it may cause problems with many sites that use indirect links. Linking without using a fully qualified domain name (FQDN) is not a good way to handle linking in my opinion, but many commercial and open source CMS systems use it. The really sad thing is those are the most likely to need their URL’s rewritten.
The problem is when the two come together at the point where your pages URL looks like a directory and you have an indirect link to file in your main directory. Suddenly your http://www.domain.com/rss.xml is relocated to /news/rss.xml, and /news/Sep/05/2005/BlogTopic/rss.xml, and every other page of your blog. All of your pages using the directory style rewrites and indirect addressing on your links will generate a 404 error when being spidered or clicked by visitors.
To avoid this, use an FQDN in the source code for all of your links. This ensures that no matter where the link is shown, it will always point to the correct page. Using a directory style rewrite on the URL’s in the first place. Using a file-style rewrite will still cause problems with indirect addressing, so be sure to go through and find those indirect links and change them.