Hi, here is my exact problem. Site works before i move to new server. I give you an example. When i click on this link: http://hyipsensor.net/board/showthread.php?t=22833 it will redirect it to: http://www.hyipsensor.net/?t=22833 That is a madness. It even rewrite the link. But if i put www in the url, it works very well: http://www.hyipsensor.net/board/showthread.php?t=22833 I suspect it has something to do with rewrite engine. Following is my .htaccess file: Could any expert take a look at it and give me some suggestions.. i have been trying whole nites. Thanks a lot.
You could remove this: RewriteCond %{HTTP_HOST} ^.*$ RewriteRule ^hyipsensor.net$ "http\:\/\/www\.hyipsensor\.net" [R=302,L] RewriteCond %{HTTP_HOST} ^.*$ RewriteRule ^www.hyipsensor.net$ "http\:\/\/www\.hyipsensor\.net" [R=302,L] Code (markup): basically since if you don't care if its www or not www , then removing the above will allow either to get to the domain. Though I wonder what prompted you or the host to put that rule in the first place.
By the way , without [L] on the end of your first RewriteRule, the execution will continue on to the next rule, so probably better putting that first RewriteRule last, so that criterias such as IP blockage and such happens prior to the rewrite evaluation.
I have removed the both rules, but same thing happen to my site.. Both rules were always there since my old server. Can it be that something wrong with the server? Maybe it is not the .htaccess problem? I do not quite get you in this one.. please guide me further.. thanks.
Whatever this does: RewriteRule hyip-(.*)-(.*)\.htm$ /?a=$1&lid=$2 continues onto the other rules even if a match is hit. adding a [L] at the end stops the processing if matched. Not sure if thats of importance to you or not. By the way who is the new host, and if you completely removed the .htaccess for a moment does the www/no-www problem persist?