alexfung Posted June 1, 2009 Posted June 1, 2009 My pages worked fine last week. After the weekend upgrade it broken. I think I've narrowed it to the .htaccess. RewriteEngine on RewriteRule (.*)\.x.l$ http://bank.alexfung.info/loadxxl.php [PT] The idea is, all requests for .xml and .xsl files will be routed to this php, which then file_get_contents() the files from a read directory that the http demon is told not to access. I have reduced the php to read: $uri=$_SERVER["REQUEST_URI"]; echo $uri; exit; but still: URI = loadxxl.php: runs correctly URI = xxx.xml: gets "400 Bad Request" <-- why? URI = xxx.xxx: gets "404 Not Found" as expected Any ideas why this would fail after the PHP upgrade? Quote
TCH-Bruce Posted June 1, 2009 Posted June 1, 2009 Are those the only 2 lines in your .htaccess file? Could be something else in there is causing the failure. Quote
SteveW Posted June 1, 2009 Posted June 1, 2009 (edited) Is there a specific reason you're using the [PT] passthrough flag? If you don't do any subsequent processing that requires it, you could try removing it. RewriteEngine on RewriteRule \.x[ms]l$ http://bank.alexfung.info/loadxxl.php [NC,L] There are two potential sources of different behavior, The new PHP version, and Apache 1.3 -> Apache 2. You've reduced the PHP file to the bare bones, so differences in the new Apache might be the more likely cause. http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html Edited June 1, 2009 by SteveW Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.