This happens when your phrase somewhere ends with domain name and a final dot - http://www.google.com. Some link activators include this dot into link address. You also may type it yourself with multiple dots: http://www.google.com...... in the browser address field. And then you'll see that all internal links on this site looks like http://www.google.com....../intl/de/options/ and they all works! I'm not so familiar with Apache, but the main thing is that I do not see this extra dots inside PHP in Apache environment variables except HTTP_REFERER. So REQUEST_URI, HTTP_HOST, SERVER_NAME contain NO extra dots. Only browser see them and build ugly links that results in ugly references. Question: Where are they? And how to cut them off.
I'm quite surprized that this dots interested nobody. Furthermore, It seems to me this is not Apache but rather htaccess forum Well, I've made some researches with direct http requests from one server to another and found that: 1. Apache understands requests like http://www.google.com./ and treats them as root directory (similar to http://www.google.com/) 2. You can type as many dots in your browser address fields as you able to: http://www.google.com............./ but (due to IE or proxy server or both of them) this request will go to server as http://www.google.com/ 3. Nevertheless, browser remember what you've typed and will build all links on received page with your dots: http://www.google.com............./blabla.html I think this is called "smart browsing" from MS So, it's nothing to rewrite in Apache. Only to clear HTTP_REFERER from possible dots (if you are interested in correct statistical data).
i thought of a way to fix this, but it is very unelegant and i don't reccoment it. but if it is bothering you that much you could have mod rewrite redirect everything once back to itself. that way your sure the url doesn't have .... you will have to add a flag to the url so that your modrewrite knows that you already redirected. so yeah its ugly, it increases server load, and i don't like it either but thats one way to do it. __________________ http://www.apacheforum.com
2noname That's wrong, because Apache really doesn't see any dots. They exist only in browser and affects only HTTP_REFERER and a method of building links by the browser, but as it is stated on php.net "HTTP_REFERER isn't a thing you can trust".