|Strange rewrite&redirect problem|
Clicking a link takes you to a wrong page
Hi, for month now I'm experiencing a problem on two separate VPS servers and I have no idea what the reason could be.
1xUbuntu 12.04, 1xDebian 6.08
apache 2.2.22 and 2.2.16
virtuozzo + plesk 11.0.9
The only connection between the servers is me and the VPS service provider.
The users are taken randomly to wrong URL when clicking a link on the site. This happens in two ways, one is the browser shows the correct URL but you are not on that page /most of the time it takes you to the rss feed's page/, in the other case the browser shows the correct URL of the page you've landed, but thats not what you've clicked on.
Restarting apache service or clearing the browser history helps most of the time, but sometimes you need both to get rid of the problem.
Have anyone experienced something similar? What could the problem be?
Welcome to WebmasterWorld!
Definitely need more info on this one to even make a "good guess" -- Intermittent errors are the worst to try and solve.
Can you give an examplified version of any rewrites/redirects you're using, plus the HTML of the link in question, and also let us know if "the oddity" happens from only one page linked to the feed or all links to the feed if there is more than one link from one page going to the feed in question?
welcome to WebmasterWorld, frufru!
try installing the HTTP Live Headers add-on for firefox and check the relevant request and response headers for clues.
the next thing i would try (assuming access to the config) is to add mod_rewrite logging and see if that reveals anything interesting.
Whoops! Overlapped phranque, for variety's sake.
Next essential question: What do logs say? In particular, do logs match what browser's address bar says? Is there a 301/302 response along the way?
Is this something you've only observed personally, or is it reported by other people on various IPs with assorted browsers?
Thanks for your answers.
Besides the standard wp rewrite rules I use some to hide the login page, but I've tried to remove it and the problem was still there.
One site is http://www.example.com , if you start clicking the menu items there's big chance that after a few clicks you'll land on the rss feed's page instead of the URL supposed and shown in the browser. On that site a simple refresh helps most of the time.
I've isntalled HTTP Live Headers /thanks for the tip/ and this is the output when the problem occures:
GET /panoramafotozas HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
Accept-Encoding: gzip, deflate
ed_size%3D744%26libraryContent%3Dbrowse; wp-settings-time-7=1381075322; __utma=259798667.1436817090.1369499177.1380889132.1380899081.18; __utmz=259798667.1369499177.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); _ga=GA1.2.1436817090.1369499177; wordpress_test_cookie=WP+Cookie+check; wordpress_logged_in_e16f582087afb435e6881a7c939099e5=krisssz%7C1384417648%7Cab8e8adf75d0a5e455f87df017020dfb; wfvt_-145710278=5281fc441518d
HTTP/1.1 200 OK
Date: Tue, 12 Nov 2013 10:00:38 GMT
Set-Cookie: wfvt_-145710278=5281e55a0e0c2; expires=Tue, 12-Nov-2013 08:52:50 GMT; path=/
Last-Modified: Wed, 23 Oct 2013 15:35:29 GMT
Content-Type: text/xml; charset=UTF-8
I've enabled rewrite logging on the other server, not the one which is running this site, this is how the output looked like:
[08/Nov/2013:18:52:19 +0100] [site.com/sid#b5d1a650][rid#b6d2a058/initial] (3) [perdir /var/www/vhosts/site.com/httpdocs/] strip per-dir prefix: /var/www/vhosts/ site.com /httpdocs/wrong_URL/ -> wrong_URL /
[edited by: phranque at 11:09 am (utc) on Nov 12, 2013]
[edit reason] Please Use example.com [webmasterworld.com] [/edit]
are there any proxy servers in the configuration that might be caching responses?
there are several unanswered questions by JD_Toims and lucy24...
The problems can occur to anyone, I'm not sure but it seems more often with firefox. Checking the logs is not so trivial with Plesk because it doesn't use the standard locations and structure, most of the times I'm confused where I should look.
I don't know if there are any proxy servers, as I wrote these are VPS servers and I don't have insight into the technical background, I have enabled mod_cache and mod_mem_cache though. I've never tried to disable it, I'll give it a try.