homepage Welcome to WebmasterWorld Guest from 54.242.231.109
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Strange rewrite&redirect problem
Clicking a link takes you to a wrong page
frufru




msg:4622513
 12:56 pm on Nov 11, 2013 (gmt 0)

Hi, for month now I'm experiencing a problem on two separate VPS servers and I have no idea what the reason could be.

The servers:
1xUbuntu 12.04, 1xDebian 6.08
apache 2.2.22 and 2.2.16
virtuozzo + plesk 11.0.9
wordpress 3.7.1
The only connection between the servers is me and the VPS service provider.

The problem:
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?

 

JD_Toims




msg:4622650
 12:26 am on Nov 12, 2013 (gmt 0)

Hey frufru,

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?

Thanks

phranque




msg:4622659
 3:40 am on Nov 12, 2013 (gmt 0)

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.

lucy24




msg:4622666
 4:19 am on Nov 12, 2013 (gmt 0)

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?

frufru




msg:4622715
 10:13 am on Nov 12, 2013 (gmt 0)

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:

http://www.example.com/panoramafotozas

GET /panoramafotozas HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: hu-hu,hu;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://www.example.com/referenciaink
Cookie: wp-settings-7=m0%3Do%26m1%3Do%26m2%3Do%26m3%3Dc%26m4%3Dc%26m5%3Do%26m6%3Do%26m7%3Do%26m8%3Do%26m9%3Do%26m10%3Dc%26
editor%3Dtinymce%26imgsize%3Dmedium%26urlbutton%3Dfile%26hidetb%3D1%26align%3Dcenter%26wplink%3D0%26m12%3Dc%26
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
Connection: keep-alive

HTTP/1.1 200 OK
Date: Tue, 12 Nov 2013 10:00:38 GMT
Server: Apache
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
X-Pingback: http://www.example.com/xmlrpc.php
Etag: "11ee13f8a935b4d1f2ba3777281f2c91"
X-Robots-Tag: noindex,follow
X-Powered-By: PleskLin
Vary: Accept-Encoding
Content-Encoding: gzip
Age: 5868
Content-Length: 1637
Connection: close
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]

phranque




msg:4622737
 11:06 am on Nov 12, 2013 (gmt 0)

are there any proxy servers in the configuration that might be caching responses?

there are several unanswered questions by JD_Toims and lucy24...

frufru




msg:4622775
 12:42 pm on Nov 12, 2013 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved