Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've discovered that one of the sites on our web server is having part certain URLs stripped away. Specifically, when a user clicks the link to display images as a slideshow the URL for that page has ?show=slide appended. Just that part is what is being stripped away.

Apart from this problem the site works correctly. Furthermore, the site used to work properly and I'm really not even sure at what point it broke, as I rarely visit it and the only thing that appears in my change log is updates to WordPress and its plugins.

I've confirmed that it's not caused by anything in the .htaccess file by installing an exact replica of the site on my dev server, from where it runs as expected. I've also duplicated the Apache virtualhost config for the site to the test server.

The only significant difference between the live and dev servers is that the former is Centos 5.5 and the other is Debian 6.0.

I'm stuck for ideas. If it's not the Apache virtualhost config or the .htaccess file, where else can I look for what might be causing this?

Update

Although to a mere human it did appear that part of the URL was being eaten up it turned out to be mod-rewrite and a 301 redirect. It was a case of misleading symptoms. The site in question runs WordPress with a number of plugins. The permalink rewriting for the main code and the permalink rewriting for one of the plugins didn't like each other and wouldn't play nicely together.

A bunch of uninstalling and reinstalling, together with turning permalinks off and on in various sequences finally got it all to work properly. As it happens, the part of the URL that was apparently disappearing was wrong anyway, resulting in a broken feature on the site.

share|improve this question
    
Is the query string disappearing from the browser, or just not showing up on the server when the request lands? And is the browser sent there directly by a link in HTML, or from a 30x location header? –  Shane Madden Mar 1 '12 at 6:07
    
@Shane, it's disappearing at the server end and it's a direct link. I've even tested it with wget, just to be sure it's nothing odd at the browser end. –  John Gardeniers Mar 1 '12 at 6:42
    
I'd say mod_rewrite is guilty until proven innocent; maybe capture a request with the RewriteLogLevel cranked up just to make sure? –  Shane Madden Mar 1 '12 at 7:13
    
@Shane, you're right. With logging cranked up it is showing a 301 on the request but I can't find what's causing it. Further investigation is needed but that will have to wait till the morning. Thanks. –  John Gardeniers Mar 1 '12 at 9:32
    
@Shane, please post your comment as an answer. mod_rewrite is indeed the culprit. –  John Gardeniers Mar 5 '12 at 20:57
add comment

1 Answer

up vote 1 down vote accepted

mod_rewrite, in the ballroom, with the candlestick.

Guilty until proven innocent indeed! Maybe edit in some details of where the rule snuck in from and how you tracked it down?

share|improve this answer
    
Credit awarded and details added. I still find it odd that the same situation didn't occur on the mirror site. –  John Gardeniers Mar 6 '12 at 1:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.